conjur-debify 1.4.0 → 1.5.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/features/detect_version.feature +7 -0
- data/features/{debify.feature → package.feature} +0 -0
- data/lib/conjur/debify.rb +31 -6
- data/lib/conjur/debify/version.rb +1 -1
- metadata +26 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 863413dc994374182b930993bd5ffde122561d49
|
|
4
|
+
data.tar.gz: 6923633f277a6648113beccf29223f02bb33e7f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28b40585fb6aa99d324ccc1528d8ef312405107c9fa8928403af3b005d78df67ceeac59926e24a80aa370ccf8912b8917a183f35a13443a51f17ec02fba5cc5b
|
|
7
|
+
data.tar.gz: d29b58cce19559c5f7033a3c5b3706915d7ebeb2dfbef100a7a8adad6a09c2bfe8e719974bdaee86b07b435afc0d4644df2bc44e3068fa87db8d7b9ca7cda28b
|
data/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Feature: Automatic version string
|
|
2
|
+
|
|
3
|
+
@announce-output
|
|
4
|
+
Scenario: 'example' project gets a default version
|
|
5
|
+
When I run `env DEBUG=true GLI_DEBUG=true debify detect-version -d ../../example`
|
|
6
|
+
Then the exit status should be 0
|
|
7
|
+
And the output should match /\d.\d.\d-\d-.*/
|
|
File without changes
|
data/lib/conjur/debify.rb
CHANGED
|
@@ -68,8 +68,15 @@ subcommand_option_handling :normal
|
|
|
68
68
|
arguments :strict
|
|
69
69
|
|
|
70
70
|
def detect_version
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
if File.exists?("VERSION") && !(base_commit = `git log --pretty='%h' VERSION | head -n 1`.strip).empty?
|
|
72
|
+
base_version = File.read("VERSION").strip
|
|
73
|
+
commits_since = `git log #{base_commit}..HEAD --pretty='%h'`.split("\n").size
|
|
74
|
+
hash = `git rev-parse --short HEAD`.strip
|
|
75
|
+
[ [ base_version, commits_since ].join('.'), hash ].join("-")
|
|
76
|
+
else
|
|
77
|
+
`git describe --long --tags --abbrev=7 --match 'v*.*.*' | sed -e 's/^v//'`.strip.tap do |version|
|
|
78
|
+
raise "No Git version (tag) for project" if version.empty?
|
|
79
|
+
end
|
|
73
80
|
end
|
|
74
81
|
end
|
|
75
82
|
|
|
@@ -333,7 +340,7 @@ command "test" do |c|
|
|
|
333
340
|
c.action do |global_options,cmd_options,args|
|
|
334
341
|
raise "project-name is required" unless project_name = args.shift
|
|
335
342
|
raise "test-script is required" unless test_script = args.shift
|
|
336
|
-
raise "
|
|
343
|
+
raise "Received extra command-line arguments" if args.shift
|
|
337
344
|
|
|
338
345
|
dir = cmd_options[:dir] || '.'
|
|
339
346
|
dir = File.expand_path(dir)
|
|
@@ -492,7 +499,7 @@ command "sandbox" do |c|
|
|
|
492
499
|
c.switch [:kill]
|
|
493
500
|
|
|
494
501
|
c.action do |global_options,cmd_options,args|
|
|
495
|
-
raise "
|
|
502
|
+
raise "Received extra command-line arguments" if args.shift
|
|
496
503
|
|
|
497
504
|
dir = cmd_options[:dir] || '.'
|
|
498
505
|
dir = File.expand_path(dir)
|
|
@@ -592,7 +599,7 @@ command "publish" do |c|
|
|
|
592
599
|
c.desc "Set the current working directory"
|
|
593
600
|
c.flag [ :d, :dir ]
|
|
594
601
|
|
|
595
|
-
c.desc "Specify the deb package version; by default, it's computed
|
|
602
|
+
c.desc "Specify the deb package version; by default, it's computed automatically"
|
|
596
603
|
c.flag [ :v, :version ]
|
|
597
604
|
|
|
598
605
|
c.desc "Maturity stage of the package, 'testing' or 'stable'"
|
|
@@ -601,7 +608,7 @@ command "publish" do |c|
|
|
|
601
608
|
c.action do |global_options,cmd_options,args|
|
|
602
609
|
raise "distribution is required" unless distribution = args.shift
|
|
603
610
|
raise "project-name is required" unless project_name = args.shift
|
|
604
|
-
raise "
|
|
611
|
+
raise "Received extra command-line arguments" if args.shift
|
|
605
612
|
|
|
606
613
|
def detect_component
|
|
607
614
|
branch = ENV['GIT_BRANCH'] || `git rev-parse --abbrev-ref HEAD`.strip
|
|
@@ -662,6 +669,24 @@ command "publish" do |c|
|
|
|
662
669
|
end
|
|
663
670
|
end
|
|
664
671
|
|
|
672
|
+
desc "Auto-detect and print the repository verison"
|
|
673
|
+
command "detect-version" do |c|
|
|
674
|
+
c.desc "Set the current working directory"
|
|
675
|
+
c.flag [ :d, :dir ]
|
|
676
|
+
c.action do |global_options,cmd_options,args|
|
|
677
|
+
raise "Received extra command-line arguments" if args.shift
|
|
678
|
+
|
|
679
|
+
dir = cmd_options[:dir] || '.'
|
|
680
|
+
dir = File.expand_path(dir)
|
|
681
|
+
|
|
682
|
+
raise "Directory #{dir} does not exist or is not a directory" unless File.directory?(dir)
|
|
683
|
+
|
|
684
|
+
Dir.chdir dir do
|
|
685
|
+
puts detect_version
|
|
686
|
+
end
|
|
687
|
+
end
|
|
688
|
+
end
|
|
689
|
+
|
|
665
690
|
pre do |global,command,options,args|
|
|
666
691
|
# Pre logic here
|
|
667
692
|
# Return true to proceed; false to abort and not call the
|
metadata
CHANGED
|
@@ -1,111 +1,111 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: conjur-debify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin Gilpin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gli
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: docker-api
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: conjur-cli
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: '0'
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: bundler
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- - ~>
|
|
59
|
+
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '1.7'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - ~>
|
|
66
|
+
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '1.7'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rake
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - ~>
|
|
73
|
+
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: '10.0'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- - ~>
|
|
80
|
+
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '10.0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: cucumber
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- -
|
|
87
|
+
- - ">="
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
89
|
version: '0'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- -
|
|
94
|
+
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: aruba
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
|
-
- -
|
|
101
|
+
- - ">="
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
103
|
version: '0'
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
|
-
- -
|
|
108
|
+
- - ">="
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
description:
|
|
@@ -116,9 +116,9 @@ executables:
|
|
|
116
116
|
extensions: []
|
|
117
117
|
extra_rdoc_files: []
|
|
118
118
|
files:
|
|
119
|
-
- .gitignore
|
|
120
|
-
- .project
|
|
121
|
-
- .rvmrc
|
|
119
|
+
- ".gitignore"
|
|
120
|
+
- ".project"
|
|
121
|
+
- ".rvmrc"
|
|
122
122
|
- CHANGELOG.md
|
|
123
123
|
- Gemfile
|
|
124
124
|
- LICENSE.txt
|
|
@@ -131,7 +131,8 @@ files:
|
|
|
131
131
|
- example/debify.sh
|
|
132
132
|
- example/distrib/postinstall.sh
|
|
133
133
|
- example/test.sh
|
|
134
|
-
- features/
|
|
134
|
+
- features/detect_version.feature
|
|
135
|
+
- features/package.feature
|
|
135
136
|
- features/step_definitions/debify_steps.rb
|
|
136
137
|
- features/support/env.rb
|
|
137
138
|
- jenkins.sh
|
|
@@ -153,22 +154,22 @@ require_paths:
|
|
|
153
154
|
- lib
|
|
154
155
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
156
|
requirements:
|
|
156
|
-
- -
|
|
157
|
+
- - ">="
|
|
157
158
|
- !ruby/object:Gem::Version
|
|
158
159
|
version: '0'
|
|
159
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
161
|
requirements:
|
|
161
|
-
- -
|
|
162
|
+
- - ">="
|
|
162
163
|
- !ruby/object:Gem::Version
|
|
163
164
|
version: '0'
|
|
164
165
|
requirements: []
|
|
165
166
|
rubyforge_project:
|
|
166
|
-
rubygems_version: 2.
|
|
167
|
+
rubygems_version: 2.4.8
|
|
167
168
|
signing_key:
|
|
168
169
|
specification_version: 4
|
|
169
170
|
summary: Utility commands to build and package Conjur services as Debian packages
|
|
170
171
|
test_files:
|
|
171
|
-
- features/
|
|
172
|
+
- features/detect_version.feature
|
|
173
|
+
- features/package.feature
|
|
172
174
|
- features/step_definitions/debify_steps.rb
|
|
173
175
|
- features/support/env.rb
|
|
174
|
-
has_rdoc:
|