diff options
| author | Selene ToyKeeper | 2023-12-05 16:49:24 -0700 |
|---|---|---|
| committer | Selene ToyKeeper | 2023-12-05 16:49:24 -0700 |
| commit | 50ae5684534ec9333a648794d4f371b882e53075 (patch) | |
| tree | e666fea7d540632dc99643468184b519e647c12d /bin/make-release.sh | |
| parent | d3aa: made it easy to switch between vddio2 and external voltage divider (diff) | |
| parent | moved version string calculation to bin/version-string.sh (diff) | |
| download | anduril-50ae5684534ec9333a648794d4f371b882e53075.tar.gz anduril-50ae5684534ec9333a648794d4f371b882e53075.tar.bz2 anduril-50ae5684534ec9333a648794d4f371b882e53075.zip | |
Merge branch 'trunk' into emisar-d3aa
* trunk:
moved version string calculation to bin/version-string.sh
forgot one item in the ChangeLog
ChangeLog: added 2023-12-03 release notes, converted @modelname to &modelname
docs: expanded / reorganized info on Version Check formats
updated MODELS, bin/models.py, and hw/BRANDS...
fw3x: document how it ships with the wrong fuse values, and how to fix it
github CI: fetch history too, to allow detection of version tags
build-all: handle the case where "git describe" can't get any tags
run CI on all branches, not just on trunk
fetch tags on CI checkout, so 'git describe' can work
added docs/battery-rainbow.png from old repo, since it's still relevant
added bin/make-release.sh to generate a .zip file ready for release
build-all.sh: re-indented, started organizing code into functions
changed version number to use the latest release tag instead of build date
Diffstat (limited to 'bin/make-release.sh')
| -rwxr-xr-x | bin/make-release.sh | 55 |
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" + |
