diff --git a/.drone.yml b/.drone.yml index 497142a..3cea822 100644 --- a/.drone.yml +++ b/.drone.yml @@ -34,7 +34,7 @@ steps: image: ubuntu:latest commands: - apt-get update && apt-get install -y git - - ./build.sh + - ./build.sh --publish --from-ci trigger: event: diff --git a/build.sh b/build.sh index a8bcc27..a5e7138 100755 --- a/build.sh +++ b/build.sh @@ -25,7 +25,7 @@ PARAMS_EXCEPT_PUBLISH=$(echo $1 | sed 's/\-\-publish//') if [[ "$@" == *'--publish'* ]] then - ./publish-version.sh ${VERSION} + ./publish-version.sh ${VERSION} $@ else echo "Did not publish. If you wanted to do so, call the script with \"--publish\" or \"--publish-local\"." fi diff --git a/publish-version.sh b/publish-version.sh index 4d4c5b9..38ed8a6 100755 --- a/publish-version.sh +++ b/publish-version.sh @@ -5,7 +5,11 @@ rm -f version.txt printf "versionName=$1-github\nversionCode=$1" >> version.txt -# You'll need to change server as your server and define a VERSION_PATH. -scp version.txt server:$VERSION_PATH - -rm 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. + scp version.txt server:$VERSION_PATH + rm version.txt +fi