Skip to content

Commit

Permalink
Allow customization of the project name
Browse files Browse the repository at this point in the history
The same way we can customize the user, allow customization of the
project name.
  • Loading branch information
smortex committed Feb 17, 2023
1 parent 763950d commit ccc4d79
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/voxpupuli/release/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,15 @@ def self.user=(user)
end

def self.user
@user || metadata['name'].split(%r{[-/]}).first
@user || project.split(%r{[-/]}).first
end

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

def self.project
@project || metadata['name']
end

def self.metadata
Expand All @@ -110,7 +118,7 @@ def self.future_release
# GCGConfig.user which might be overrider in the module Rakefile.
options = GitHubChangelogGenerator::Parser.default_options
options[:user] = GCGConfig.user
options[:project] = GCGConfig.metadata['name']
options[:project] = GCGConfig.project
options[:future_release] = GCGConfig.future_release
options[:header] = <<~HEADER.chomp
# Changelog
Expand Down

0 comments on commit ccc4d79

Please sign in to comment.