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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70c7c3f2b86000da6bcba2c94d22aeabe5f0d433
4
- data.tar.gz: 0dc6785c2f831f4b75b3133c9050797ddd1bd9b7
3
+ metadata.gz: 6234e6919844d4f9e7546fcecb7e58711d9bab64
4
+ data.tar.gz: 8c25759cc79929d0f825d0980f88c16bdd59ce4a
5
5
  SHA512:
6
- metadata.gz: f4a890537942e8ea538ffd701615dad86fd9fbedc5f54cbfd28a7d75afa1da80a6e9f8b4aaa91f72340c8376d6f48216c93db076b56f82ba7fd5bb65909d9154
7
- data.tar.gz: 4356556f737aaf1c98d0be54ec61c2beed20c2cded3c803a099b4468ca3a159c75f1528f2b359472a1b1edb96ee65b4301a3af435011cebca6b4c89b1d346dec
6
+ metadata.gz: 4bbfae6415164b4e058df0bdef17a1a85a872c358f298eaa97700f029412901223238b6b2eabaf6d1459b19347b04bde21ba7e5bcd045b1074232a8058fc76f8
7
+ data.tar.gz: 70bdefd68d94284c1c74e8db6b5658e15ca6498835421e739fc0c13b55f3e80c277eafced2a15b4234b9b625521152e4a33e04b233049d87d52d5cf0476e17c0
@@ -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}
@@ -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
- log "Operation failed: #{e.message}", 'error'
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
@@ -10,6 +10,8 @@ module Docman
10
10
 
11
11
  define_hooks :before_push, :after_push, :before_build, :after_build, :before_deploy, :after_deploy
12
12
 
13
+ attr_accessor :build_results
14
+
13
15
  @@deployers = {}
14
16
 
15
17
  def self.create(params, context = nil, caller = nil)
@@ -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', tag)
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
 
@@ -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)
@@ -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
@@ -11,7 +11,7 @@ module Docman
11
11
  if c
12
12
  c.new(params, context, caller, 'tagger')
13
13
  else
14
- raise "Bad tagger type: #{type}"
14
+ raise "Bad tagger type: #{params['handler']}"
15
15
  end
16
16
  end
17
17
 
@@ -1,3 +1,3 @@
1
1
  module Docman
2
- VERSION = "0.0.85"
2
+ VERSION = "0.0.86"
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.85
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-13 00:00:00.000000000 Z
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: ''