mirror of
https://github.com/restic/rest-server.git
synced 2026-09-26 05:51:24 -07:00
Write version into main.go
This commit is contained in:
@@ -12,6 +12,8 @@ before:
|
|||||||
- test -n "{{ .Env.VERSION }}"
|
- test -n "{{ .Env.VERSION }}"
|
||||||
# make sure the file VERSION contains the latest version (used for build.go)
|
# make sure the file VERSION contains the latest version (used for build.go)
|
||||||
- bash -c 'echo "{{ .Env.VERSION }}" > VERSION'
|
- bash -c 'echo "{{ .Env.VERSION }}" > VERSION'
|
||||||
|
# make sure that mani.go contains the latest version
|
||||||
|
- sed -i 's/var version = "[^"]*"/var version = "${VERSION}"/' cmd/rest-server/main.go
|
||||||
# make sure the file CHANGELOG.md is up to date
|
# make sure the file CHANGELOG.md is up to date
|
||||||
- calens --output CHANGELOG.md
|
- calens --output CHANGELOG.md
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
export VERSION=0.10.0
|
export VERSION=0.10.0
|
||||||
|
|
||||||
2. Add new version to file VERSION:
|
2. Add new version to file `VERSION` and `main.go` and commit the result:
|
||||||
|
|
||||||
echo "${VERSION}" | tee VERSION && git commit -m "Update VERSION file for ${VERSION}" VERSION
|
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`:
|
3. Move changelog files for `calens`:
|
||||||
|
|
||||||
@@ -30,3 +32,8 @@
|
|||||||
release \
|
release \
|
||||||
--config ../.goreleaser.yml \
|
--config ../.goreleaser.yml \
|
||||||
--release-notes <(calens --template changelog/CHANGELOG-GitHub.tmpl --version "${VERSION}")
|
--release-notes <(calens --template changelog/CHANGELOG-GitHub.tmpl --version "${VERSION}")
|
||||||
|
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user