travis-build-tools 2.0.46.0 → 2.0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/travis-build-tools/builder.rb +10 -7
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MzNjMzZmMWIzMmU3ZDIzYWFiOTRjMjhiNWFhZDY5OTQ3ZGIxM2U0Yw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZDllNTE2NzI5NzQ3MDQwOGYzZjE5NTg1OWUzZDM0OGRmYmQ4NjdjNg==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZTMxN2VhZjcxMjM4Yzk2OTE4MzQ2YjcwYmI3NDE0ZTNmMTIyODIzODgyOWFi
|
|
10
|
+
NzlhMGNmYjdkNTI5YWU0YTA0ZjkwY2I0NjI3NzEzOWE1ZDEwMjhmYzYzNzU5
|
|
11
|
+
ODgwOTZhOTVhYjVkNDMyOTgzYjc3OGMxNWI5ZjkzMDQzMTVkYmY=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NmZkMDE5MjljMGIxMjM1OTg0Y2I1MTI5NGZlZWQyNDc2MGFjYjU2NWZmMGVj
|
|
14
|
+
NzUzZTNiOGVkNTU0YWE4YWE1YTgyZjYzZTg0MGVmMjU2M2VjZGY3ZGMyODZj
|
|
15
|
+
ZGNlMzFhYjIzZjIyYjUzZDRhMDU3OTQ5OWFjMjAwZThmMzRmYmI=
|
|
@@ -3,10 +3,13 @@ module TravisBuildTools
|
|
|
3
3
|
def initialize(service_user, git_repository = nil)
|
|
4
4
|
@service_user = service_user
|
|
5
5
|
origin_url = %x[git config --get remote.origin.url]
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
raise '
|
|
9
|
-
|
|
6
|
+
git_repository ||= origin_url.split('://')[1] || origin_url.split('@')[1]
|
|
7
|
+
raise 'git_repository is not specified' if !git_repository
|
|
8
|
+
raise 'service_user is not specified' if !service_user
|
|
9
|
+
|
|
10
|
+
#Set the service remote
|
|
11
|
+
puts %x[git remote add service https://#{service_user}@#{git_repository}]
|
|
12
|
+
puts %x[git fetch service]
|
|
10
13
|
end
|
|
11
14
|
|
|
12
15
|
def publish_git_tag(tag_name)
|
|
@@ -19,7 +22,7 @@ module TravisBuildTools
|
|
|
19
22
|
puts %x[git tag #{tag_name} -a -m "Generated tag from TravisCI."]
|
|
20
23
|
puts "Pushing Git tag #{tag_name}."
|
|
21
24
|
|
|
22
|
-
%x[git push --tags --quiet
|
|
25
|
+
%x[git push --tags --quiet service #{tag_name} > /dev/null 2>&1]
|
|
23
26
|
end
|
|
24
27
|
end
|
|
25
28
|
|
|
@@ -40,10 +43,10 @@ module TravisBuildTools
|
|
|
40
43
|
next_branch_to_merge = (sorted_branches.drop_while{|b| b <= current_release_version}.map{|v| release_branch_name + v.to_s} + ['master']).first
|
|
41
44
|
|
|
42
45
|
#create a merge commit for that branch
|
|
43
|
-
puts %x[git merge --no-ff
|
|
46
|
+
puts %x[git merge --no-ff service/#{next_branch_to_merge} -m"Merge remote-tracking branch '#{ENV['TRAVIS_BRANCH']}'"]
|
|
44
47
|
puts "Merging to downstream branch: #{next_branch_to_merge}"
|
|
45
48
|
#push origin for that branch using the service user
|
|
46
|
-
%x[git push --quiet
|
|
49
|
+
%x[git push --quiet service HEAD:#{next_branch_to_merge} > /dev/null 2>&1]
|
|
47
50
|
end
|
|
48
51
|
end
|
|
49
52
|
end
|