Skip to content

Commit ebadef1

Browse files
author
divverent
committed
Add a script to build releases.
1 parent 2ee2b95 commit ebadef1

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ $(LICENSES_THIRD_PARTY):
142142
GO="$(GO)" GOOS= GOARCH= scripts/collect-licenses.sh $(PACKAGE) $(LICENSES_THIRD_PARTY)
143143

144144
# Building of release zip files starts here.
145-
ZIPFILE = aaaaxy-$(shell scripts/version.sh gittag).zip
145+
ZIPFILE = aaaaxy.zip
146146

147147
.PHONY: addextras
148148
addextras: $(EXTRAFILES)

scripts/binary-release.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
# Copyright 2021 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -ex
17+
18+
prev=$(git describe --always --long)
19+
prev=${prev%-*-g*}
20+
21+
new=$(sh scripts/version.sh gittag)
22+
23+
echo "Releaseing: $prev -> $new."
24+
25+
make allrelease
26+
mv aaaaxy.zip "aaaaxy-$new.zip"
27+
28+
git tag -a "$new" -m "$(
29+
echo "Release $new."
30+
echo
31+
echo "Changes since $prev:"
32+
git log --format='%w(72,2,4)- %s' "$prev"..
33+
)" -e
34+
35+
echo "Now run:"
36+
echo " git push tag $new"
37+
echo "Then upload aaaaxy-$new.zip"

0 commit comments

Comments
 (0)