15 # Auto-configure jv-branch:public and jv-branch:private |
15 # Auto-configure jv-branch:public and jv-branch:private |
16 # repositories based on the URL of rakefiles. |
16 # repositories based on the URL of rakefiles. |
17 # |
17 # |
18 origin_forest_url = HG::Repository.new(BUILD_DIR / '..').paths['default'].slice(0.. - 'stx-goodies-builder-rake'.size - 2) |
18 origin_forest_url = HG::Repository.new(BUILD_DIR / '..').paths['default'].slice(0.. - 'stx-goodies-builder-rake'.size - 2) |
19 cloned_from_bitbucket = origin_forest_url =~ /bitbucket.org/ |
19 cloned_from_bitbucket = origin_forest_url =~ /bitbucket.org/ |
20 cloned_from_swing = origin_forest_url =~ /swing\.fit\.cvut\.cz/ |
20 cloned_from_swing = (origin_forest_url =~ /swing\.fit\.cvut\.cz/) || (origin_forest_url =~ /192\.168\.12\.1/) |
21 cloned_fron_devsrepo = (not cloned_from_bitbucket) and (not cloned_from_swing) |
|
22 |
|
23 |
21 |
24 repository :'jv-branch:public' do |
22 repository :'jv-branch:public' do |
25 type :hg |
23 type :hg |
26 separator '-' |
24 separator '-' |
27 canonical "https://bitbucket.org/janvrany" |
25 canonical "https://bitbucket.org/janvrany" |
28 |
26 if (not cloned_from_bitbucket) and (not cloned_from_swing) |
29 case |
|
30 when cloned_from_swing |
|
31 staging "ssh://hg@swing.fit.cvut.cz//var/local/hg" |
|
32 when cloned_fron_devsrepo |
|
33 upstream "ssh://hg@swing.fit.cvut.cz//var/local/hg" |
27 upstream "ssh://hg@swing.fit.cvut.cz//var/local/hg" |
34 staging origin_forest_url |
|
35 end |
28 end |
|
29 staging origin_forest_url |
36 end |
30 end |
37 |
31 |
38 # Only core developer and/or Jenkins have access to |
32 # Only core developer and/or Jenkins have access to |
39 # stx:stc and stx:librun... |
33 # stx:stc and stx:librun... |
40 if (core_developer? or jenkins?) |
34 if (core_developer? or jenkins?) |
41 repository :'jv-branch:private' do |
35 repository :'jv-branch:private' do |
42 type :hg |
36 type :hg |
43 separator '-' |
37 separator '-' |
44 case |
38 if ((not cloned_from_bitbucket) and (not cloned_from_swing)) |
45 when cloned_fron_devsrepo |
|
46 canonical origin_forest_url |
39 canonical origin_forest_url |
47 else |
40 else |
48 canonical "ssh://192.168.12.2//hg" |
41 canonical "ssh://192.168.12.2//hg" |
49 end |
42 end |
50 end |
43 end |