mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-28 21:07:39 +00:00
release: script improvements (#915)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
9fb492b572
commit
ff3d2fcce3
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
trap 'exit 1' SIGINT SIGTERM
|
trap 'exit 1' SIGINT SIGTERM
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
set -ex
|
||||||
|
|
||||||
export SSHDIR="$HOME/.ssh"
|
export SSHDIR="$HOME/.ssh"
|
||||||
mkdir -p "$SSHDIR"
|
mkdir -p "$SSHDIR"
|
||||||
@ -6,8 +7,7 @@ echo "$ACTIONS_DEPLOY_KEY" > "$SSHDIR/key"
|
|||||||
chmod 600 "$SSHDIR/key"
|
chmod 600 "$SSHDIR/key"
|
||||||
export SERVER_DEPLOY_STRING="$SSH_USERNAME@$SERVER_ADDRESS:$SERVER_DESTINATION"
|
export SERVER_DEPLOY_STRING="$SSH_USERNAME@$SERVER_ADDRESS:$SERVER_DESTINATION"
|
||||||
mkdir -p "$GITHUB_WORKSPACE/APS"
|
mkdir -p "$GITHUB_WORKSPACE/APS"
|
||||||
cp -v "$GITHUB_WORKSPACE/app/build/outputs/apk/free/release/*.apk" "$GITHUB_WORKSPACE/APS"
|
cp -v ./app/build/outputs/apk/free/release/*.apk "$GITHUB_WORKSPACE/APS/"
|
||||||
cp -v "$GITHUB_WORKSPACE/app/build/outputs/apk/nonFree/release/*.apk" "$GITHUB_WORKSPACE/APS"
|
cp -v ./app/build/outputs/apk/nonFree/release/*.apk "$GITHUB_WORKSPACE/APS/"
|
||||||
cd "$GITHUB_WORKSPACE/APS"
|
cd "$GITHUB_WORKSPACE/APS"
|
||||||
rsync -ahvcr --omit-dir-times --progress --delete --no-o --no-g -e "ssh -i $SSHDIR/key -o StrictHostKeyChecking=no -p $SSH_PORT" . "$SERVER_DEPLOY_STRING" || exit 1
|
rsync -ahvcr --omit-dir-times --progress --delete --no-o --no-g -e "ssh -i $SSHDIR/key -o StrictHostKeyChecking=no -p $SSH_PORT" . "$SERVER_DEPLOY_STRING"
|
||||||
exit 0
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function send_to_tg() {
|
|
||||||
local FILE
|
|
||||||
local CHAT_ID
|
|
||||||
local CAPTION
|
|
||||||
FILE="${1}"
|
|
||||||
CHAT_ID="${2}"
|
|
||||||
CAPTION="${3}"
|
|
||||||
curl -F chat_id="${CHAT_ID}" -F document="@${FILE}" -F caption="${CAPTION}" -F parse_mode="Markdown" "https://api.telegram.org/bot${TG_TOKEN:?}/sendDocument" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
send_to_tg "${TG_FILE:?}" "${TG_TO:?}" "aps-${GITHUB_RUN_NUMBER}-debug"
|
|
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
# Simple script that uses OpenSSL to encrypt a provided file with a provided key, and writes the result
|
# Simple script that uses OpenSSL to encrypt a provided file with a provided key, and writes the result
|
||||||
# to the provided path. Yes it's very needy.
|
# to the provided path. Yes it's very needy.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
# Delete Release key
|
# Delete Release key
|
||||||
rm -f keystore.jks
|
rm -f keystore.jks
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
ENCRYPT_KEY=$1
|
ENCRYPT_KEY=$1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user