mirror of
https://github.com/keyboardio/Chrysalis.git
synced 2026-02-28 19:07:17 +01:00
36 lines
769 B
Bash
Executable File
36 lines
769 B
Bash
Executable File
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
package_version() {
|
|
jq -r .version <package.json
|
|
}
|
|
|
|
URL_BASE="https://github.com/keyboardio/Chrysalis-Firmware-Bundle/releases"
|
|
TARBALL_FN="firmware-files.tar.gz"
|
|
|
|
case "$(package_version)" in
|
|
*-snapshot)
|
|
TAG="snapshot"
|
|
;;
|
|
*)
|
|
TAG="v$(package_version)"
|
|
;;
|
|
esac
|
|
|
|
URL="${URL_BASE}/download/${TAG}/${TARBALL_FN}"
|
|
|
|
wget -q -O - ${URL} | tar -C static -xzf -
|
|
git add static/**/default.{hex,bin} static/firmware-changelog.md static/build-info.yml
|
|
|
|
TMP=$(mktemp)
|
|
cat >${TMP} <<EOF
|
|
Update the firmware files we ship with
|
|
|
|
Artifacts downloaded from keyboardio/Chrysalis-Firmware-Bundle@${TAG}.
|
|
|
|
$(head -n 17 static/release-notes.md | tail -n +3)
|
|
EOF
|
|
git commit -s -F "${TMP}"
|
|
rm -f "${TMP}" static/release-notes.md
|