Skip to content

Commit

Permalink
Add script to automate releases a little
Browse files Browse the repository at this point in the history
  • Loading branch information
zachahn committed Jan 17, 2021
1 parent f6a0ae6 commit 27ad488
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bin/prepare_release
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -e
set -x

bundle
appraisal

ruby \
-e 'load "lib/super/version.rb"' \
-e 'contents = File.read("CHANGELOG.md")' \
-e 'new_header = "Unreleased]\n\n## [#{Super::VERSION}] - #{Time.now.strftime("%F")}"' \
-e 'File.write("CHANGELOG.md", contents.sub(/Unreleased\]/, new_header)) if !contents.include?(Super::VERSION)'

git commit --all --message="Release v`ruby -e 'load "lib/super/version.rb"' -e 'print Super::VERSION'`"

0 comments on commit 27ad488

Please sign in to comment.