mirror of
https://github.com/restic/rest-server.git
synced 2025-12-06 17:15:45 -08:00
1.4 KiB
1.4 KiB
-
Export
$VERSION:export VERSION=0.10.0 -
Add new version to file
VERSIONandmain.goand commit the result: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 -
Move changelog files for
calens:mv changelog/unreleased "changelog/${VERSION}_$(date +%Y-%m-%d)" git add "changelog/${VERSION}"* git rm -r changelog/unreleased git commit -m "Move changelog files for ${VERSION}" changelog/{unreleased,"${VERSION}"*} -
Generate changelog:
calens > CHANGELOG.md git add CHANGELOG.md git commit -m "Generate CHANGELOG.md for ${VERSION}" CHANGELOG.md -
Tag new version and push the tag:
git tag -a -s -m "v${VERSION}" "v${VERSION}" git push --tags -
Build the project (use
--skip-publishfor testing):goreleaser \ release \ --config ../.goreleaser.yml \ --release-notes <(calens --template changelog/CHANGELOG-GitHub.tmpl --version "${VERSION}") -
Set a new version in
main.goand 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