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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a87f0635033d7067739f96255716a2557457456
4
- data.tar.gz: 69717f387d3798a10bfd1252a06fe14f1a9259e6
3
+ metadata.gz: a9a863bc312f2d28dd9cc3c40057c63fae242eee
4
+ data.tar.gz: a03288fc0e747778b1f1e436aaa2c94bc42152cb
5
5
  SHA512:
6
- metadata.gz: 0be3608ef18ac6ce7a36be85ca5c6ad17e8aaf19c41773b0f5e0a5e64c680841dbdb11e51962970c8df905d669cb3c71c72a6c3c150f56dc083bf5b64c4746e4
7
- data.tar.gz: 7fb112c3a8e54595e8625be316e6918b59a096f1bdf0a6e90912268362feede5fb63675b6792d311b65f7c9d2b4cc01f98373c325b75ee0e8042c03eebcd9a02
6
+ metadata.gz: c7b8f28d81e738b1118d8a9e4b4a8f6189802c0034d97c728301415dbe32ad5dd118a206397a77b1d3322d4e8e7936c6593c5229efb3e1471736c622cddf51f8
7
+ data.tar.gz: c9e3c54c174049f2a36a30e262affa5993220604b5bf5d8acd634fa4c32f15837d046cf8d699c0f49af3001e4270ef589972937e1eacad9127493b29e9e762a5
@@ -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 [ -n "$SUGGESTED_VERSION" ]; then
99
- if [[ $NEXT == 1 ]]; then
100
- INPUT_STRING=$SUGGESTED_VERSION
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 [$SUGGESTED_VERSION]: " INPUT_STRING
121
+ read -p "Enter a version number: " INPUT_STRING
103
122
  if [ "$INPUT_STRING" = "" ]; then
104
- INPUT_STRING=$SUGGESTED_VERSION
123
+ echo "Version number should not be empty to continue."
124
+ exit 1
105
125
  fi
106
126
  fi
107
127
  else
108
- read -p "Enter a version number: " INPUT_STRING
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"
@@ -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('--next') if options[:next]
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)
@@ -1,3 +1,3 @@
1
1
  module Docman
2
- VERSION = "0.0.96"
2
+ VERSION = "0.0.97"
3
3
  end
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.96
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-03-30 00:00:00.000000000 Z
11
+ date: 2018-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler