gfsm 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +0 -0
- data/.gitignore +0 -0
- data/.gitlab-ci.yml +5 -5
- data/.tool-versions +0 -0
- data/.vscode/launch.json +2 -2
- data/Gemfile +0 -0
- data/Gemfile.lock +0 -0
- data/README.md +0 -0
- data/bin/gfsm +2 -0
- data/gfsm.gemspec +0 -0
- data/gfsmrc.yml +0 -0
- data/lib/commands/base_command.rb +0 -0
- data/lib/commands/changelog.rb +6 -2
- data/lib/commands/help.rb +0 -0
- data/lib/commands/version.rb +0 -0
- data/lib/data/change_type.rb +0 -0
- data/lib/data/commit.rb +0 -0
- data/lib/data/configuration.rb +1 -1
- data/lib/data/version.rb +0 -0
- data/lib/tools/commits_extractor.rb +2 -2
- data/lib/tools/commits_subdivider.rb +0 -2
- data/lib/tools/current_version_loader.rb +2 -1
- data/lib/tools/output.rb +0 -0
- data/lib/tools/version_bumper.rb +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8f7e5ab344ba700d815ccb45c8517034ef447a54662085cb471a038722b3654
|
4
|
+
data.tar.gz: 77c2ecb3172f22400ca421aed782f1e432fe0f0e96edad34da75f7eb16ae3b3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/bin/gfsm
CHANGED
data/gfsm.gemspec
CHANGED
File without changes
|
data/gfsmrc.yml
CHANGED
File without changes
|
File without changes
|
data/lib/commands/changelog.rb
CHANGED
@@ -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 |
|
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
|
data/lib/commands/version.rb
CHANGED
File without changes
|
data/lib/data/change_type.rb
CHANGED
File without changes
|
data/lib/data/commit.rb
CHANGED
File without changes
|
data/lib/data/configuration.rb
CHANGED
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, {
|
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, '
|
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
|
@@ -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, {
|
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
|
data/lib/tools/version_bumper.rb
CHANGED
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.
|
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.
|
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
|