Class: Decidim::Releaser
- Inherits:
-
Object
- Object
- Decidim::Releaser
- Defined in:
- lib/decidim/releaser.rb
Defined Under Namespace
Classes: InvalidMetadataError
Constant Summary collapse
- DECIDIM_VERSION_FILE =
".decidim-version"
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(token:, exit_with_unstaged_changes:) ⇒ Releaser
constructor
A new instance of Releaser.
Constructor Details
#initialize(token:, exit_with_unstaged_changes:) ⇒ Releaser
Returns a new instance of Releaser.
13 14 15 16 |
# File 'lib/decidim/releaser.rb', line 13 def initialize(token:, exit_with_unstaged_changes:) @token = token @exit_with_unstaged_changes = exit_with_unstaged_changes end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/decidim/releaser.rb', line 18 def call exit_if_unstaged_changes if @exit_with_unstaged_changes run("git checkout #{release_branch}") run("git pull origin #{release_branch}") bump_decidim_version! run("bin/rake update_versions") run("bin/rake bundle") run("npm install") generate_changelog # rubocop:disable Rails/Output puts "You need to prepare the CHANGELOG.md by merging the three files: RELEASES_NOTES.md, temporay_changelog.md and CHANGELOG.md" puts "After you finish leave the change staged" system ENV.fetch("SHELL") # rubocop:enable Rails/Output run("git checkout -b chore/prepare/#{version_number}") run("git commit -a -m 'Prepare #{version_number} release'") run("git push origin chore/prepare/#{version_number}") end |