docman 0.0.85 → 0.0.86
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 +5 -5
- data/lib/application.rb +2 -1
- data/lib/docman/deployers/deployer.rb +2 -0
- data/lib/docman/deployers/git_deployer.rb +2 -2
- data/lib/docman/git_util.rb +2 -1
- data/lib/docman/logging.rb +1 -1
- data/lib/docman/taggers/source_tagger.rb +15 -0
- data/lib/docman/taggers/tagger.rb +1 -1
- data/lib/docman/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6234e6919844d4f9e7546fcecb7e58711d9bab64
|
4
|
+
data.tar.gz: 8c25759cc79929d0f825d0980f88c16bdd59ce4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bbfae6415164b4e058df0bdef17a1a85a872c358f298eaa97700f029412901223238b6b2eabaf6d1459b19347b04bde21ba7e5bcd045b1074232a8058fc76f8
|
7
|
+
data.tar.gz: 70bdefd68d94284c1c74e8db6b5658e15ca6498835421e739fc0c13b55f3e80c277eafced2a15b4234b9b625521152e4a33e04b233049d87d52d5cf0476e17c0
|
data/bin/bump-version.sh
CHANGED
@@ -48,8 +48,8 @@ if [ -f VERSION ]; then
|
|
48
48
|
cat CHANGES >> tmpfile
|
49
49
|
mv tmpfile CHANGES
|
50
50
|
git add CHANGES VERSION
|
51
|
-
git commit -m "[skip] [ci-skip] Version bump to $INPUT_STRING"
|
52
|
-
git tag -a -m "[skip] [ci-skip] Tagging version $INPUT_STRING" "$INPUT_STRING"
|
51
|
+
git commit -m "[skip] [ci-skip] [ci skip] Version bump to $INPUT_STRING"
|
52
|
+
git tag -a -m "[skip] [ci-skip] [ci skip] Tagging version $INPUT_STRING" "$INPUT_STRING"
|
53
53
|
git push origin ${INPUT_STRING}
|
54
54
|
git push origin master
|
55
55
|
else
|
@@ -67,8 +67,8 @@ else
|
|
67
67
|
echo "" >> CHANGES
|
68
68
|
echo "" >> CHANGES
|
69
69
|
git add VERSION CHANGES
|
70
|
-
git commit -m "[skip] [ci-skip] Added VERSION and CHANGES files, Version bump to 0.1.0"
|
71
|
-
git tag -a -m "[skip] [ci-skip] Tagging version 0.1.0" "0.1.0"
|
70
|
+
git commit -m "[skip] [ci-skip] [ci skip] Added VERSION and CHANGES files, Version bump to 0.1.0"
|
71
|
+
git tag -a -m "[skip] [ci-skip] [ci skip] Tagging version 0.1.0" "0.1.0"
|
72
72
|
git push origin --tags
|
73
73
|
git push origin master
|
74
74
|
fi
|
@@ -92,7 +92,7 @@ if [ -n "$1" ]; then
|
|
92
92
|
echo "version: $TAG" >> info.yaml
|
93
93
|
git add info.yaml
|
94
94
|
if [ -n "$3" ] && [ "$3" == "skip" ]; then
|
95
|
-
git commit -m "[skip] [ci-skip] Changed tag to: $TAG" & git push -u origin ${BRANCH}
|
95
|
+
git commit -m "[skip] [ci-skip] [ci skip] Changed tag to: $TAG" & git push -u origin ${BRANCH}
|
96
96
|
else
|
97
97
|
git commit -m "Changed tag to: $TAG"
|
98
98
|
git push -u origin ${BRANCH}
|
data/lib/application.rb
CHANGED
@@ -36,6 +36,7 @@ require 'docman/commands/nexus_provider_cmd'
|
|
36
36
|
require 'docman/taggers/tagger'
|
37
37
|
require 'docman/taggers/incremental_tagger'
|
38
38
|
require 'docman/taggers/option_tagger'
|
39
|
+
require 'docman/taggers/source_tagger'
|
39
40
|
|
40
41
|
module Docman
|
41
42
|
class Application < Docman::Command
|
@@ -72,7 +73,7 @@ module Docman
|
|
72
73
|
end
|
73
74
|
yield
|
74
75
|
rescue Exception => e
|
75
|
-
|
76
|
+
puts "Operation failed: #{e.message}", 'error'
|
76
77
|
if write_to_file
|
77
78
|
File.open(failed_filepath, 'w') {|f| f.write(e.message) }
|
78
79
|
end
|
@@ -23,8 +23,8 @@ module Docman
|
|
23
23
|
tag = version
|
24
24
|
end
|
25
25
|
|
26
|
-
GitUtil.commit(root['full_build_path'], root['full_build_path'], 'Updated version'
|
27
|
-
GitUtil.squash_commits(Docman::Application.instance.commit_count)
|
26
|
+
GitUtil.commit(root['full_build_path'], root['full_build_path'], 'Updated version')
|
27
|
+
GitUtil.squash_commits(Docman::Application.instance.commit_count, nil, tag)
|
28
28
|
GitUtil.push(root['full_build_path'], root.version(type: 'root'))
|
29
29
|
end
|
30
30
|
|
data/lib/docman/git_util.rb
CHANGED
@@ -16,7 +16,7 @@ module Docman
|
|
16
16
|
result
|
17
17
|
end
|
18
18
|
|
19
|
-
def self.squash_commits(commit_count, message = nil)
|
19
|
+
def self.squash_commits(commit_count, message = nil, tag = nil)
|
20
20
|
message = "$(git log --format=%B --reverse HEAD..HEAD@{1})" unless message
|
21
21
|
exec "reset --soft HEAD~#{commit_count}"
|
22
22
|
if Application::instance.options.has_key?('debug')
|
@@ -24,6 +24,7 @@ module Docman
|
|
24
24
|
else
|
25
25
|
exec "commit --quiet --no-verify -m \"#{message}\""
|
26
26
|
end
|
27
|
+
self.tag(Dir.pwd, tag) if tag
|
27
28
|
end
|
28
29
|
|
29
30
|
def self.reset_repo(path)
|
data/lib/docman/logging.rb
CHANGED
@@ -32,7 +32,7 @@ module Docman
|
|
32
32
|
|
33
33
|
def log(message, type = 'debug')
|
34
34
|
if type == 'debug'
|
35
|
-
if Application::instance.options.has_key?('debug')
|
35
|
+
if Application::instance.options.respond_to?('has_key') and Application::instance.options.has_key?('debug')
|
36
36
|
logger.send(type, "#{prefix} - #{message}")
|
37
37
|
end
|
38
38
|
else
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'docman/taggers/tagger'
|
2
|
+
|
3
|
+
module Docman
|
4
|
+
class SourceTagger < Docman::Taggers::Tagger
|
5
|
+
|
6
|
+
register_tagger :source
|
7
|
+
|
8
|
+
def execute
|
9
|
+
if @caller.build_results['master']['version_type'] == 'tag'
|
10
|
+
@caller.build_results['master']['version']
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
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.86
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Tolstikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -233,6 +233,7 @@ files:
|
|
233
233
|
- lib/docman/logging.rb
|
234
234
|
- lib/docman/taggers/incremental_tagger.rb
|
235
235
|
- lib/docman/taggers/option_tagger.rb
|
236
|
+
- lib/docman/taggers/source_tagger.rb
|
236
237
|
- lib/docman/taggers/tagger.rb
|
237
238
|
- lib/docman/version.rb
|
238
239
|
homepage: ''
|