Skip to content

Commit b51f3f0

Browse files
author
greg
committed
update tagging & add new version release
Signed-off-by: greg <[email protected]>
1 parent b18cd94 commit b51f3f0

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

project/history.go

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ func FullVersion() string {
3030
// release tagging script: ./scripts/tag_release.sh
3131
var History relic.ImmutableHistory = relic.NewHistory("Monax Hoard", "https://github.com/monax/hoard").
3232
MustDeclareReleases(
33+
"1.1.5 - 2018-10-17",
34+
`Scripted integration tests, better makefile and ci configs, gcs creds read from env var.`,
35+
3336
"1.1.4",
3437
`IPFS & GCP Support`,
3538

scripts/tag_release.sh

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#!/usr/bin/env bash
2-
# uncomment to use the local changes
3-
# vcmd="go run ./cmd/hoarctl/main.go version"
42

53
set -e
64

@@ -13,27 +11,30 @@ if ! git diff-index --quiet HEAD ; then
1311
git diff-index HEAD
1412
echo
1513
echo "Please commit them or stash them before tagging a release."
14+
echo
1615
fi
1716

18-
echo "This command will tag the current commit $(git rev-parse --short HEAD)"
19-
echo "based on the latest version/release info defined programmatically in"
20-
echo "./release/release.go. It will then push the version tag."
21-
echo "In order for this tag to be released the commit must already be merged"
22-
echo "to master."
17+
version=v$(go run ./project/cmd/version/main.go)
18+
notes=$(go run ./project/cmd/notes/main.go)
19+
20+
echo "This command will tag the current commit $(git rev-parse --short HEAD) as version $version"
21+
echo "defined programmatically in project/releases.go with release notes:"
22+
echo
23+
echo "$notes" | sed 's/^/> /'
24+
echo
25+
echo "It will then push the version tag to origin."
2326
echo
2427
read -p "Do you want to continue? [Y\n]: " -r
2528
# Just hitting return defaults to continuing
2629
[[ $REPLY ]] && [[ ! $REPLY =~ ^[Yy]$ ]] && echo && exit 0
2730
echo
2831

29-
# We expect this to be built from HEAD (which is ensured from make tag_release)
30-
vcmd="bin/hoarctl version"
31-
version=v$(${vcmd})
32-
notes=$(${vcmd} notes)
32+
# Create tag
3333
echo "Tagging version $version with message:"
3434
echo ""
3535
echo "$notes"
3636
echo ""
37-
echo "$notes" | git tag -a ${version} -F-
37+
echo "$notes" | git tag -s -a ${version} -F-
3838

39+
# Push tag
3940
git push origin ${version}

0 commit comments

Comments
 (0)