Skip to content

Commit

Permalink
Allow to customize GCG future_release tag label
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Feb 15, 2023
1 parent 02304b0 commit 763950d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/voxpupuli/release/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ def self.user
def self.metadata
@metadata ||= Blacksmith::Modulefile.new.metadata
end

def self.tag_pattern=(tag_pattern)
@tag_pattern = tag_pattern
end

def self.tag_pattern
@tag_pattern || 'v%s'
end

def self.future_release
format(tag_pattern, metadata['version'])
end
end

task "release:porcelain:changelog" do
Expand All @@ -99,7 +111,7 @@ def self.metadata
options = GitHubChangelogGenerator::Parser.default_options
options[:user] = GCGConfig.user
options[:project] = GCGConfig.metadata['name']
options[:future_release] = "v#{GCGConfig.metadata['version']}" if GCGConfig.metadata['version'].match?(/^\d+\.\d+.\d+$/)
options[:future_release] = GCGConfig.future_release
options[:header] = <<~HEADER.chomp
# Changelog
Expand Down

0 comments on commit 763950d

Please sign in to comment.