docman 0.0.96 → 0.0.97
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/bin/bump-version.sh +26 -10
- data/lib/docman/cli.rb +3 -1
- data/lib/docman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9a863bc312f2d28dd9cc3c40057c63fae242eee
|
4
|
+
data.tar.gz: a03288fc0e747778b1f1e436aaa2c94bc42152cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7b8f28d81e738b1118d8a9e4b4a8f6189802c0034d97c728301415dbe32ad5dd118a206397a77b1d3322d4e8e7936c6593c5229efb3e1471736c622cddf51f8
|
7
|
+
data.tar.gz: c9e3c54c174049f2a36a30e262affa5993220604b5bf5d8acd634fa4c32f15837d046cf8d699c0f49af3001e4270ef589972937e1eacad9127493b29e9e762a5
|
data/bin/bump-version.sh
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
|
16
16
|
POSITIONAL=()
|
17
17
|
BRANCH="master"
|
18
|
+
TAG=""
|
18
19
|
NEXT=0
|
19
20
|
SKIP=0
|
20
21
|
|
@@ -36,6 +37,16 @@ while [[ $# -gt 0 ]]; do
|
|
36
37
|
shift # past argument=value
|
37
38
|
fi
|
38
39
|
;;
|
40
|
+
-t|--tag*)
|
41
|
+
if [[ $key == "-t" ]] || [[ $key == "--tag" ]]; then
|
42
|
+
TAG="$2"
|
43
|
+
shift # past argument
|
44
|
+
shift # past value
|
45
|
+
else
|
46
|
+
TAG="${1#*=}"
|
47
|
+
shift # past argument=value
|
48
|
+
fi
|
49
|
+
;;
|
39
50
|
-n|--next)
|
40
51
|
NEXT=1
|
41
52
|
shift # past argument
|
@@ -48,6 +59,7 @@ while [[ $# -gt 0 ]]; do
|
|
48
59
|
echo "Usage: -[hbns] [state] [next] [skip]"
|
49
60
|
echo -e "\t-h, --help\n\t\tShow this help message."
|
50
61
|
echo -e "\t-b [branch], --branch [branch], --branch=[branch]\n\t\tTag specific branch."
|
62
|
+
echo -e "\t-t [tag], --tag [tag], --tag=[tag]\n\t\tBump specific version."
|
51
63
|
echo -e "\t-n, --next\n\t\tSet next release without prompt."
|
52
64
|
echo -e "\t-s, --skip\n\t\tSkip CI trigger with commit message."
|
53
65
|
exit 0
|
@@ -95,21 +107,25 @@ if [ -f VERSION ]; then
|
|
95
107
|
fi
|
96
108
|
fi
|
97
109
|
|
98
|
-
if [
|
99
|
-
if [
|
100
|
-
|
110
|
+
if [[ $TAG == "" ]]; then
|
111
|
+
if [ -n "$SUGGESTED_VERSION" ]; then
|
112
|
+
if [[ $NEXT == 1 ]]; then
|
113
|
+
INPUT_STRING=$SUGGESTED_VERSION
|
114
|
+
else
|
115
|
+
read -p "Enter a version number [$SUGGESTED_VERSION]: " INPUT_STRING
|
116
|
+
if [ "$INPUT_STRING" = "" ]; then
|
117
|
+
INPUT_STRING=$SUGGESTED_VERSION
|
118
|
+
fi
|
119
|
+
fi
|
101
120
|
else
|
102
|
-
read -p "Enter a version number
|
121
|
+
read -p "Enter a version number: " INPUT_STRING
|
103
122
|
if [ "$INPUT_STRING" = "" ]; then
|
104
|
-
|
123
|
+
echo "Version number should not be empty to continue."
|
124
|
+
exit 1
|
105
125
|
fi
|
106
126
|
fi
|
107
127
|
else
|
108
|
-
|
109
|
-
if [ "$INPUT_STRING" = "" ]; then
|
110
|
-
echo "Version number should not be empty to continue."
|
111
|
-
exit 1
|
112
|
-
fi
|
128
|
+
INPUT_STRING=$TAG
|
113
129
|
fi
|
114
130
|
|
115
131
|
echo "Will set new version to be $INPUT_STRING"
|
data/lib/docman/cli.rb
CHANGED
@@ -73,13 +73,15 @@ module Docman
|
|
73
73
|
desc 'bump', 'Bump version'
|
74
74
|
method_option :next, :type => :boolean, :aliases => '-n', :desc => 'Automatically use next version number'
|
75
75
|
method_option :branch, :type => :string, :aliases => '-b', :desc => 'Bump release on specific branch'
|
76
|
+
method_option :tag, :type => :string, :aliases => '-t', :desc => 'Set specific tag for release bump'
|
76
77
|
method_option :skip, :type => :boolean, :aliases => '-s', :desc => 'Skip CI with commit message'
|
77
78
|
#option :state
|
78
79
|
#option :skip
|
79
80
|
def bump(state = nil)
|
80
81
|
bump_params = []
|
81
82
|
bump_params.push("--branch=#{options[:branch]}") if options[:branch]
|
82
|
-
bump_params.push(
|
83
|
+
bump_params.push("--tag=#{options[:tag]}") if options[:tag]
|
84
|
+
bump_params.push('--next') if options[:next] and (not options.has_kay? :tag or options[:tag].empty?)
|
83
85
|
bump_params.push('--skip') if options[:skip]
|
84
86
|
system "#{Application::bin}/bump-version.sh #{bump_params.join(' ')} #{state}"
|
85
87
|
say('Complete!', :green)
|
data/lib/docman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.97
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Tolstikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|