SCP from ci.
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
aminecmi 2022-09-14 10:24:43 +02:00
parent 3e47c6737e
commit 99322a0551
3 changed files with 10 additions and 6 deletions

View File

@ -34,7 +34,7 @@ steps:
image: ubuntu:latest image: ubuntu:latest
commands: commands:
- apt-get update && apt-get install -y git - apt-get update && apt-get install -y git
- ./build.sh - ./build.sh --publish --from-ci
trigger: trigger:
event: event:

View File

@ -25,7 +25,7 @@ PARAMS_EXCEPT_PUBLISH=$(echo $1 | sed 's/\-\-publish//')
if [[ "$@" == *'--publish'* ]] if [[ "$@" == *'--publish'* ]]
then then
./publish-version.sh ${VERSION} ./publish-version.sh ${VERSION} $@
else else
echo "Did not publish. If you wanted to do so, call the script with \"--publish\" or \"--publish-local\"." echo "Did not publish. If you wanted to do so, call the script with \"--publish\" or \"--publish-local\"."
fi fi

View File

@ -5,7 +5,11 @@
rm -f version.txt rm -f version.txt
printf "versionName=$1-github\nversionCode=$1" >> version.txt printf "versionName=$1-github\nversionCode=$1" >> version.txt
if [[ "$@" == *'--from-ci'* ]]
then
echo "File created. HANDLE IN CI"
else
# You'll need to change server as your server and define a VERSION_PATH. # You'll need to change server as your server and define a VERSION_PATH.
scp version.txt server:$VERSION_PATH scp version.txt server:$VERSION_PATH
rm version.txt rm version.txt
fi