-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20456f8
commit f2bb34d
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
|
||
## Unreleased | ||
|
||
* [Feature] Support multiple domains | ||
* [Feature] Support after-success hooks | ||
* [Feature] Ability to run in staging mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
# File is a modified copy from https://github.com/michaelsauter/crane/blob/master/release.sh | ||
|
||
set -eux | ||
|
||
version=$1 | ||
|
||
if [ -z "$version" ]; then | ||
echo "No version passed! Example usage: ./release.sh 1.0.0" | ||
exit 1 | ||
fi | ||
|
||
echo "Update version..." | ||
old_version=$(grep -o "[0-9]*\.[0-9]*\.[0-9]*" VERSION) | ||
sed -i.bak 's/Version = "'$old_version'"/Version = "'$version'"/' VERSION | ||
rm VERSION.bak | ||
sed -i.bak 's/'$old_version'/'$version'/' README.md | ||
rm README.md.bak | ||
|
||
echo "Mark version as released in changelog..." | ||
today=$(date +'%Y-%m-%d') | ||
sed -i.bak 's/Unreleased/Unreleased\ | ||
\ | ||
## '$version' ('$today')/' CHANGELOG.md | ||
rm CHANGELOG.md.bak | ||
|
||
echo "Update contributors..." | ||
git contributors | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}' > CONTRIBUTORS | ||
|
||
echo "Update repository..." | ||
git add VERSION README.md CHANGELOG.md | ||
git commit -m "Bump version to ${version}" | ||
git tag --message="v$version" --force "v$version" | ||
git tag --message="latest" --force latest | ||
|
||
echo "v$version tagged." | ||
echo "Now, run 'git push origin master && git push --tags --force' and publish the release on GitHub." | ||
fi |