Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Adds script to generate release notes draft

AuthorDaveJarvis <email>
Date2025-08-27 19:04:54 GMT-0700
Commit483d90057f0ba60f6be85a3b1390c728cf36ea28
Parent53cda37
.gitignore
keenwrite.build_artifacts.txt
todo
-tokens/
publish.sh
readonly APP_NAME=$(cut -d= -f2 ./src/main/resources/bootstrap.properties)
readonly APP_NAME_LC=${APP_NAME,,}
-readonly PATH_TOKEN="tokens/${APP_NAME_LC}.pat"
readonly URL=$(cat "tokens/publish.url")
readonly FILE_VERSION="version.txt"
# ---------------------------------------------------------------------------
# Adds download URLs to a release.
#
-# $1 - The system (Linux, WIndows, MacOS, Java)
+# $1 - The system (Linux, Windows, MacOS, Java)
# ---------------------------------------------------------------------------
release() {
local -r OS="${1}"
- local ARCH=" (64-bit, x86)"
local FILE_PREFIX="${APP_NAME_LC}"
local FILE_SUFFIX="bin"
;;
Java)
- ARCH=""
FILE_SUFFIX="jar"
;;
upload "${BINARY}"
-
- glab release upload ${RELEASE} \
- --assets-links="[{
- \"name\":\"${APP_NAME} for ${OS}${ARCH}\",
- \"url\":\"https://${APP_NAME_LC}.com/downloads/${BINARY}\",
- \"link_type\":\"other\"
- }]"
}
scp "${FILENAME}" "${URL}"
else
- echo "Missing ${FILE_BINARY}, continuing."
+ $log "Skipping ${FILE_BINARY} ..."
fi
}
-
-if [ -f "${PATH_TOKEN}" ]; then
- cat "${PATH_TOKEN}" | glab auth login --hostname gitlab.com --stdin
-
- glab release create ${RELEASE}
- release "Windows"
- release "MacOS"
- release "Linux"
- release "Java"
+release "Windows"
+release "MacOS"
+release "Linux"
+release "Java"
- echo "${RELEASE}" > "${FILE_VERSION}"
- upload "${FILE_VERSION}"
- mv "${FILE_VERSION}" "www/downloads"
-else
- echo "Create ${PATH_TOKEN} before publishing the release."
-fi
+echo "${RELEASE}" > "${FILE_VERSION}"
+upload "${FILE_VERSION}"
+mv "${FILE_VERSION}" "www/downloads"
tokens/.gitignore
+publish.url
tokens/.placeholder
Delta10 lines added, 28 lines removed, 18-line decrease