rest-server/Release.md

44 lines
1.6 KiB
Markdown
Raw Normal View History

1. Export `$VERSION`:
2020-05-22 17:25:19 +02:00
export VERSION=0.10.0
2020-05-22 17:41:47 +02:00
2. Add new version to file `VERSION` and `main.go` and commit the result:
2020-05-22 17:41:47 +02:00
echo "${VERSION}" | tee VERSION
sed -i "s/var version = \"[^\"]*\"/var version = \"${VERSION}\"/" cmd/rest-server/main.go
git commit -m "Update VERSION files for ${VERSION}" VERSION cmd/rest-server/main.go
3. Move changelog files for `calens`:
2020-05-22 17:25:19 +02:00
mv changelog/unreleased "changelog/${VERSION}_$(date +%Y-%m-%d)"
2020-05-24 10:07:09 +02:00
rm -f "changelog/${VERSION}_$(date +%Y-%m-%d)/.gitkeep"
2020-05-22 17:25:19 +02:00
git add "changelog/${VERSION}"*
git rm -r changelog/unreleased
2020-05-24 10:07:09 +02:00
mkdir changelog/unreleased
touch changelog/unreleased/.gitkeep
git add changelog/unreleased/.gitkeep
2020-05-22 17:25:19 +02:00
git commit -m "Move changelog files for ${VERSION}" changelog/{unreleased,"${VERSION}"*}
4. Generate changelog:
2020-05-22 17:25:19 +02:00
calens > CHANGELOG.md
git add CHANGELOG.md
git commit -m "Generate CHANGELOG.md for ${VERSION}" CHANGELOG.md
5. Tag new version and push the tag:
2020-05-22 17:25:19 +02:00
git tag -a -s -m "v${VERSION}" "v${VERSION}"
git push --tags
2020-05-24 10:07:09 +02:00
6. Build the project (use `--skip-publish` for testing, or pass `--config` to
use another config file):
2020-05-22 17:25:19 +02:00
goreleaser \
release \
--release-notes <(calens --template changelog/CHANGELOG-GitHub.tmpl --version "${VERSION}")
2020-05-22 17:41:47 +02:00
7. Set a new version in `main.go` and commit the result:
sed -i "s/var version = \"[^\"]*\"/var version = \"${VERSION}-dev\"/" cmd/rest-server/main.go
git commit -m "Update version for development" cmd/rest-server/main.go