mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-12 22:09:43 -04:00
Update bash scripts
Former-commit-id: 0128dcfee587fdadf7866e2360bf05a20233e5e6 [formerly 8d52eddf4e72893b00be5a14a2b569f251ac6dc3] [formerly 2c5adacd345cfe6fe86198867605775c9df51b90] [formerly 05c61d02ee4d888e0aa0b34b6a0ff9047ddff2a3 [formerly 5f4ee9a6a138fb13a9efa7071714e3c118aadae4 [formerly ab0650377fe49a5f94c89448e7eb4244e79c8ae6]]] Former-commit-id: 432955a35d482c9ddcbcbbea008bc5185cdc58e7 [formerly b1c8c9fb550fdcac069f6163e2d4017187f5e6ed [formerly 2f418171af44391b41cff2106d47309a6f91ff58]] Former-commit-id: aa000be52738a4dd989dfd05ffbd5b3e69bfa32a [formerly 24c437d62fbd2d92f688d0119ea7a79c6dbac354] Former-commit-id: 8af81625deb191e21faba01edc76c4bd4cbec65f
This commit is contained in:
parent
192e1909ac
commit
010965a07b
@ -1,12 +1,16 @@
|
||||
#!/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"
|
||||
if [[ "qq${CRON_LAUNCHED}" != "qq" ]]; then
|
||||
echo "This script was launched by the GitHub Cron proces"
|
||||
CURRENT_DATE=$(date +'%Y-%m-%d')
|
||||
target="/data/download/nightly/$CURRENT_DATE"
|
||||
fi
|
||||
echo "Uploading packages to https://download.kiwix.org/$target/"
|
||||
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"
|
||||
scp -o StrictHostKeyChecking=no -i $file ci@download.kiwix.org:$target
|
||||
echo "Copied $file to $target"
|
||||
fi
|
||||
done
|
@ -13,10 +13,11 @@
|
||||
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
|
||||
echo "This script was launched by the GitHub Cron job"
|
||||
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"
|
||||
VERSION="v$VERSION-$COMMIT_ID"
|
||||
fi
|
||||
if [[ $VERSION =~ ^v?[0-9.]+ ]]; then
|
||||
VERSION=$(sed 's/^v//' <<<"$VERSION") # Remove any leading v
|
||||
|
Loading…
x
Reference in New Issue
Block a user