Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update changelog in rake update #28

Merged
merged 5 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/bump-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ jobs:
id: bump-version
run: |
bundle exec rake "bump[${{ steps.extract-version.outputs.next_version }}]"
{ \
printf '# %s\n\n' "${{ steps.extract-version.outputs.next_version }}"; \
git log --format='* %s' "v${{ steps.extract-version.outputs.current_version }}..HEAD"; \
printf '\n'; \
cat CHANGES.md; \
} > CHANGES.md.new
mv CHANGES.md.new CHANGES.md
- uses: peter-evans/create-pull-request@v5
with:
commit-message: rake bump[${{ steps.extract-version.outputs.next_version }}]
Expand All @@ -48,6 +41,8 @@ jobs:
title: Bump to v${{ steps.extract-version.outputs.next_version }}
body: |
Bump to v${{ steps.extract-version.outputs.next_version }}.
[![lint and test](https://github.com/sudotac/temml-ruby/actions/workflows/lint-and-test.yml/badge.svg?branch=bump-to-${{ steps.extract-version.outputs.newer_version }})](https://github.com/sudotac/temml-ruby/actions/workflows/lint-and-test.yml)

Don't forget to execute the workflow!
[![lint and test](https://github.com/sudotac/temml-ruby/actions/workflows/lint-and-test.yml/badge.svg?branch=bump-to-${{ steps.extract-version.outputs.next_version }})](https://github.com/sudotac/temml-ruby/actions/workflows/lint-and-test.yml)
assignees: sudotac
reviewers: sudotac
4 changes: 3 additions & 1 deletion .github/workflows/upgrade-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ jobs:
delete-branch: true
title: Upgrade Temml to v${{ steps.check-versions.outputs.newer_version }}
body: |
Upgrade Temml to v${{ steps.check-versions.outputs.newer_version }}.
Upgrade Temml to v[${{ steps.check-versions.outputs.newer_version }}](https://github.com/ronkok/Temml/releases/tag/v${{ steps.check-versions.outputs.newer_version }}).

Don't forget to execute the workflow!
[![lint and test](https://github.com/sudotac/temml-ruby/actions/workflows/lint-and-test.yml/badge.svg?branch=upgrade-temml-to-${{ steps.check-versions.outputs.newer_version }})](https://github.com/sudotac/temml-ruby/actions/workflows/lint-and-test.yml)
assignees: sudotac
reviewers: sudotac
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.6.0
# v0.6.0

* Import Temml v0.10.16
* Add workflow to bump this gem
Expand Down
12 changes: 12 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ task :update, :version do |_task, args| # rubocop:disable Metrics/BlockLength
File.read('lib/temml/version.rb')
.gsub(/TEMML_VERSION\s*=\s*'.*?'/,
"TEMML_VERSION = '#{version}'"))

# Update CHANGES.md
gem_version = Temml::VERSION.split('.').map(&:to_i)
gem_version[1] += 1 # bump minor version
File.write('CHANGES.md', <<~CHANGE
# v#{gem_version[0]}.#{gem_version[1]}.#{gem_version[2]}

* Import Temml v#{version}

#{File.read('CHANGES.md')}
CHANGE
)
end

desc 'Bump version of this gem'
Expand Down