From ad4b60d028eb8b5724b51a4b91d3e7445058494a Mon Sep 17 00:00:00 2001 From: Aisnote Liu Date: Mon, 22 Aug 2022 08:35:21 -0700 Subject: [PATCH] save script --- deploy-dev.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ deploy.sh | 6 +++--- 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 deploy-dev.sh diff --git a/deploy-dev.sh b/deploy-dev.sh new file mode 100644 index 0000000..643489b --- /dev/null +++ b/deploy-dev.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +echo -e "\033[0;32mDeploying lomorage.apk to GitHub...\033[0m" + +### mm/dd/yyyy ### +now=$(date +'%Y-%m-%d_%H-%M-%S') +echo $now + +rm -fr *.apk + +### $1 +orig_apk_path=$1 +echo "orig_apk_path="$orig_apk_path +if [[ "$orig_apk_path" == "" ]]; then + orig_apk_path='/h/myproject/lomoware/lomo-android/app/release/' +fi + +### $2 +orig_apk_file=$2 +echo "orig_apk_file="$orig_apk_file +if [[ "$orig_apk_file" == "" ]]; then + orig_apk_file="com.lomoware.lomorage-v9(0.72)-release" +fi + + +echo $orig_apk_file + +orig_apk_file_path=$orig_apk_path$orig_apk_file'.apk' + +echo $orig_apk_file_path + +cp $orig_apk_file_path ./ + +release_apk_file=$orig_apk_file$now.apk + +echo $release_apk_file + +mv "./"$orig_apk_file".apk" "./"$release_apk_file + + + +tag=$now +hub release delete $now +hub release create -a $release_apk_file -m "dev release $now" $now \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index 4815b94..295b413 100644 --- a/deploy.sh +++ b/deploy.sh @@ -44,9 +44,9 @@ mv "./"$orig_apk_file".apk" "./"$release_apk_file -tag=$now -hub release delete $now -hub release create -a $release_apk_file -m "latest release $now" $now +tag="release/${version_code}" +hub release delete $tag +hub release create -a $release_apk_file -m "latest release ($tag) $now" $tag cd $homepage ./updatever.sh -p android -D $version_code -T $release_time \ No newline at end of file