gfsm 0.1.2 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4adb0619c155f4f5822638aaefbcf01f4c6d391afe7ec684b5f11c60ce87722e
4
- data.tar.gz: 6c5d26fdec70a95caa05f4f2dc5c4849dda521a32a4d573e370a909c42c8b416
3
+ metadata.gz: f8f7e5ab344ba700d815ccb45c8517034ef447a54662085cb471a038722b3654
4
+ data.tar.gz: 77c2ecb3172f22400ca421aed782f1e432fe0f0e96edad34da75f7eb16ae3b3b
5
5
  SHA512:
6
- metadata.gz: 5a7ddfc1af4e5f4407b107bb53ad799d9c2392fe72f62ed8bfee06d1ef259dd78358a1fc80d7de2f32e52b4dc29573ee24d00e41d2a5f202e979bd0d5f524811
7
- data.tar.gz: 8682eb74f946d40dea90cc361f2035ec8c7003f63f8ba94ba3c2e91a550ad73ae2a6cce15909d85cecd9da85fe1742244a220075bec3195bc93e88bde55d837d
6
+ metadata.gz: fc6e772626ccfcb72805c0c0c7f6fbcc8aa5f9e434b2843978df1953fc8b39a03293e272e60f1244d2ce893f035f48024bf613887bcedbcbdc63d5b49f1384b3
7
+ data.tar.gz: dfd7b5c4fde16aaf750c9b5964f9c845b5600acbe82aea2a65733d8bc3a3c48b52284c0a9e1208361aa8fcfe649536e58eae05d24e21fc88a87adee2da3e2219
data/.editorconfig CHANGED
File without changes
data/.gitignore CHANGED
File without changes
data/.gitlab-ci.yml CHANGED
@@ -15,7 +15,7 @@ workflow:
15
15
 
16
16
  Update version:
17
17
  stage: version
18
- image: ruby:2.7
18
+ image: ruby:2.7.5
19
19
  before_script:
20
20
  - gem install gfsm
21
21
  script:
@@ -33,7 +33,7 @@ Update version:
33
33
  # - GEM_HOST_API_KEY: A valid RubyGems API key.
34
34
  Publish gem:
35
35
  stage: deploy
36
- image: ruby:2.7
36
+ image: ruby:2.7.5
37
37
  variables:
38
38
  GEMSPEC_FILE: "gfsm.gemspec"
39
39
  GEM_FILE: "gfsm-${RELEASE_VERSION}.gem"
@@ -54,6 +54,7 @@ Publish gem:
54
54
  when: never
55
55
  - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
56
56
  when: never
57
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
57
58
 
58
59
  Create release:
59
60
  stage: release
@@ -61,8 +62,6 @@ Create release:
61
62
  script:
62
63
  - |
63
64
  release-cli create --name "Release v$RELEASE_VERSION" --description CHANGELOG.md --tag-name "v$RELEASE_VERSION"
64
- tags:
65
- - unix
66
65
  needs:
67
66
  - job: "Update version"
68
67
  artifacts: true
@@ -72,4 +71,5 @@ Create release:
72
71
  - if: '$GEM_HOST_API_KEY == null'
73
72
  when: never
74
73
  - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
75
- when: never
74
+ when: never
75
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
data/.tool-versions CHANGED
File without changes
data/.vscode/launch.json CHANGED
@@ -8,8 +8,8 @@
8
8
  "name": "Debug Local File",
9
9
  "type": "Ruby",
10
10
  "request": "launch",
11
- "program": "${workspaceRoot}/lib/gfsm.rb",
12
- "args": ["changelog"]
11
+ "program": "${workspaceRoot}/bin/gfsm",
12
+ "args": ["version", "bump"]
13
13
  }
14
14
  ]
15
15
  }
data/Gemfile CHANGED
File without changes
data/Gemfile.lock CHANGED
File without changes
data/README.md CHANGED
File without changes
data/bin/gfsm CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
4
+
3
5
  require 'gfsm'
4
6
  GFSM.main
data/gfsm.gemspec CHANGED
File without changes
data/gfsmrc.yml CHANGED
File without changes
File without changes
@@ -76,11 +76,15 @@ module GFSM
76
76
 
77
77
  version_bumper = GFSM::Tools::VersionBumper.new()
78
78
  version = version_bumper.compute_version!(force, prerelease, prerelease_name, repository_path, configuration_file_path)
79
- subdivisions = version_bumper.subdivisions
79
+ subdivisions = version_bumper.subdivisions.to_a
80
+ subdivisions.sort_by! { |subdivision_data| subdivision_data[0].priority }.reverse!
80
81
 
81
82
  changelog_entries = ""
82
83
 
83
- subdivisions.each do |change_type, commits|
84
+ subdivisions.each do |subdivision_data|
85
+ change_type = subdivision_data[0]
86
+ commits = subdivision_data[1]
87
+
84
88
  changelog_entries += "\n#{change_type.to_changelog_entry}\n\n"
85
89
 
86
90
  commits.each do |commit|
data/lib/commands/help.rb CHANGED
File without changes
File without changes
File without changes
data/lib/data/commit.rb CHANGED
File without changes
@@ -18,7 +18,7 @@ module GFSM
18
18
  end
19
19
  end
20
20
 
21
- @change_types.sort_by! { |change_type| change_type.priority }.reverse!
21
+ @change_types
22
22
  end
23
23
 
24
24
  def get_change_type_from_category(category)
data/lib/data/version.rb CHANGED
File without changes
@@ -11,13 +11,13 @@ module GFSM
11
11
  repo = Git.open(repo_path)
12
12
 
13
13
  begin
14
- last_tag_name = repo.describe(nil, { abbrev: 0 })
14
+ last_tag_name = repo.describe(nil, { :tags => true, :abbrev => 0 })
15
15
  rescue
16
16
  last_tag_name = nil
17
17
  end
18
18
 
19
19
  begin
20
- commits = last_tag_name ? repo.log.between(last_tag_name, 'head') : repo.log
20
+ commits = last_tag_name ? repo.log.between(last_tag_name, 'HEAD') : repo.log
21
21
  commits.each_with_object([]) do |commit, memo|
22
22
  trailer = commit.message.match(CHANGELOG_TRAILER_REGEX)
23
23
  memo << GFSM::Data::Commit.new(commit, trailer[:name], trailer[:category]) if trailer
@@ -18,8 +18,6 @@ module GFSM
18
18
 
19
19
  return subdivisions
20
20
  end
21
-
22
-
23
21
  end
24
22
  end
25
23
  end
@@ -8,8 +8,9 @@ module GFSM
8
8
  class CurrentVersionLoader
9
9
  def self.load_current_version(repo_path = ".")
10
10
  repo = Git.open(repo_path)
11
+
11
12
  begin
12
- last_tag_name = repo.describe(nil, { abbrev: 0 })
13
+ last_tag_name = repo.describe(nil, { :tags => true, :abbrev => 0 })
13
14
  rescue
14
15
  last_tag_name = nil
15
16
  end
data/lib/tools/output.rb CHANGED
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gfsm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zille Marco
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.3.17
111
+ rubygems_version: 3.1.6
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: This gem adds support to bump the semantic version bump and generate changelog