mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-09 12:19:46 -04:00
Prepare scripts for CRON rewriting
Former-commit-id: aab35d287e61a31deaa1569435ca124ea28a53d5 [formerly 00e70710b473593a69112d179031698fd256918c] [formerly 20b3c01b10679e87a7f0dbbcbee616a54306f82b] [formerly 188036c924ce2ee3d6aae32bc5f714555f1a966a [formerly 1def0b1c98acba1624df8c599351c9fe06487ac8 [formerly 4eaeb5798be9163a3f8e8544b1036a27bf0e4318]]] Former-commit-id: 0fd21d3663d07eace206bed1bf6228d413d582dd [formerly 0dfdd8e8f5b5a5308ba4b0fa3ea34e0ca2387735 [formerly 9810ac5b71f8be136785d405e910ac963a71a07b]] Former-commit-id: fbe6b8405a403b441bb5132880e22d4bd5ba95b9 [formerly 6f9845b91082e01d7d623a5fbbc1d686686de867] Former-commit-id: 9b2d6ff32b5061b7b98639a05e7c32b923092e65
This commit is contained in:
parent
bc16e0a1e1
commit
8e2f1d3ce2
12
scripts/publish_linux_packages_to_kiwix.sh
Normal file
12
scripts/publish_linux_packages_to_kiwix.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script to upload Linux packages to download.kiwix.org
|
||||||
|
target="/data/download/release/kiwix-js-electron"
|
||||||
|
echo "Uploading the files to https://download.kiwix.org/$target/"
|
||||||
|
echo "ssh -o StrictHostKeyChecking=no -i ./scripts/ssh_key ci@download.kiwix.org mkdir -p $target"
|
||||||
|
for file in ./bld/Electron/* ; do
|
||||||
|
if [[ $file =~ \.(AppImage|deb|rpm)$ ]]; then
|
||||||
|
echo "scp -r -p -o StrictHostKeyChecking=no -i $file ci@download.kiwix.org:$target"
|
||||||
|
echo "Copied $file to $target"
|
||||||
|
fi
|
||||||
|
done
|
@ -11,6 +11,13 @@
|
|||||||
|
|
||||||
# Use the override value by preference
|
# Use the override value by preference
|
||||||
VERSION=${INPUT_VERSION}
|
VERSION=${INPUT_VERSION}
|
||||||
|
# If the script was launched by Cron, then there will be no INPUT_VERSION, so construct a nightly version number
|
||||||
|
if [[ "qq${CRON_LAUNCHED}" != "qq" ]]; then
|
||||||
|
COMMIT_ID=$(git rev-parse --short HEAD)
|
||||||
|
# Get version from init.js
|
||||||
|
VERSION="$(grep 'params\[.appVersion' www/js/init.js | sed -E "s/[^[:digit:]]+([^\"']+).*/\1/")"
|
||||||
|
VERSION="v$VERSION$COMMIT_ID"
|
||||||
|
fi
|
||||||
if [[ $VERSION =~ ^v?[0-9.]+ ]]; then
|
if [[ $VERSION =~ ^v?[0-9.]+ ]]; then
|
||||||
VERSION=$(sed 's/^v//' <<<"$VERSION") # Remove any leading v
|
VERSION=$(sed 's/^v//' <<<"$VERSION") # Remove any leading v
|
||||||
echo "Using the valid override input and setting version to $VERSION"
|
echo "Using the valid override input and setting version to $VERSION"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user