roger_sneakpeek 0.0.2 → 0.0.3
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/roger_sneakpeek/ci.rb +23 -0
- data/lib/roger_sneakpeek/finalizer.rb +7 -2
- data/lib/roger_sneakpeek/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fabd70b50930cfdeb776fb1295dde4db3d462124
|
4
|
+
data.tar.gz: 0262a704c6751f09a98622566c20b9985cb905a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7591fdbd1d2b8c4a682db88f83564aee0812e20b0818554f267c1c85968eaba47dac49e76aece5b2c80c5a6caf16212166e6f294d2676c552edaecf8654311e
|
7
|
+
data.tar.gz: 08efcb0016a91b3587740e2491338ad8c3141f15b3bd654a47fbc13cf4e70dfa03e0562c50af90445652b0c8c7d2f79f9f87e2904904f2c1e6e856669bf1e9cd
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
module RogerSneakpeek
|
2
|
+
# Get relevant git info
|
3
|
+
class CI
|
4
|
+
# Are we running in CI?
|
5
|
+
def self.ci?
|
6
|
+
ENV["CI"]
|
7
|
+
end
|
8
|
+
|
9
|
+
def tag
|
10
|
+
ENV["CI_BUILD_TAG"]
|
11
|
+
end
|
12
|
+
|
13
|
+
def sha
|
14
|
+
ENV["CI_BUILD_REF"]
|
15
|
+
end
|
16
|
+
|
17
|
+
# Will return current branch or tag
|
18
|
+
# in CI mode.
|
19
|
+
def branch
|
20
|
+
ENV["CI_BUILD_REF_NAME"]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -6,6 +6,7 @@ require "uri"
|
|
6
6
|
require "json"
|
7
7
|
|
8
8
|
require File.dirname(__FILE__) + "/git"
|
9
|
+
require File.dirname(__FILE__) + "/ci"
|
9
10
|
|
10
11
|
module RogerSneakpeek
|
11
12
|
# Finalizer to zip and upload release
|
@@ -32,7 +33,7 @@ module RogerSneakpeek
|
|
32
33
|
end
|
33
34
|
|
34
35
|
# If we run in ci_only mode and are not in CI we stop.
|
35
|
-
return if options[:ci_only] && !
|
36
|
+
return if options[:ci_only] && !CI.ci?
|
36
37
|
|
37
38
|
@release = release
|
38
39
|
@current_options = options
|
@@ -72,7 +73,11 @@ module RogerSneakpeek
|
|
72
73
|
end
|
73
74
|
|
74
75
|
def upload_release(zip_path)
|
75
|
-
|
76
|
+
if CI.ci?
|
77
|
+
git = CI.new()
|
78
|
+
else
|
79
|
+
git = Git.new(path: release.project.path)
|
80
|
+
end
|
76
81
|
|
77
82
|
data = perform_upload(
|
78
83
|
sneakpeek_url(git),
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roger_sneakpeek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flurin Egger
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- README.md
|
138
138
|
- Rakefile
|
139
139
|
- lib/roger_sneakpeek.rb
|
140
|
+
- lib/roger_sneakpeek/ci.rb
|
140
141
|
- lib/roger_sneakpeek/finalizer.rb
|
141
142
|
- lib/roger_sneakpeek/git.rb
|
142
143
|
- lib/roger_sneakpeek/version.rb
|