aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/make-release.sh55
1 files changed, 55 insertions, 0 deletions
diff --git a/bin/make-release.sh b/bin/make-release.sh
new file mode 100755
index 0000000..da985d1
--- /dev/null
+++ b/bin/make-release.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+# Create a release file for Anduril .hex files.
+# Copyright (C) 2023 Selene ToyKeeper
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+set -e # abort on error
+
+# run from repo root
+REPODIR=$(dirname "$0")/..
+cd "$REPODIR"
+
+# get rid of 1st arg if it's "release" passed from 'make'
+[[ "$1" = "release" ]] && shift
+
+# try to get the repo ready for a release
+# (or not; probably better to do these steps manually)
+#make clean
+#make
+
+# release name
+#REV=$(date +'%Y-%m-%d')
+REV=$(git describe --tags --dirty --match='r2*')
+REV="${REV:1}" # convert 'r2023-...' to '2023-...'
+# allow manually specifying a release name
+[[ -n "$1" ]] && REV="$1"
+
+# releases are named "$project.$revision"
+RELNAME="anduril.$REV"
+
+# release directory
+RELDIR="releases/$RELNAME"
+mkdir -p "$RELDIR" "$RELDIR/hex"
+
+# add documentation and stuff
+cp -a \
+ ChangeLog.md \
+ LICENSE \
+ MODELS \
+ README.md \
+ docs/anduril-manual.md \
+ docs/battery-rainbow.png \
+ docs/which-hex-file.md \
+ "$RELDIR"
+
+# add the .hex files
+rename -f 's|hex/anduril.|'"$RELDIR/hex/$RELNAME"'.|;' hex/*.hex
+
+# make a .zip file
+cd releases
+mkdir -p zip
+ZPATH=zip/"$RELNAME".zip
+zip -q -r "$ZPATH" "$RELNAME"
+cd ..
+ls -l "releases/$ZPATH"
+
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.