only deploy fdroid on release tag

This commit is contained in:
Kyle Spearrin 2019-06-10 15:05:49 -04:00
parent 3be53235a5
commit 61bf43cd96

View file

@ -37,7 +37,7 @@ install:
sudo apt-get -qq update sudo apt-get -qq update
sudo apt-get -qqy install --no-install-recommends fdroidserver wget sudo apt-get -qqy install --no-install-recommends fdroidserver wget
- sh: | - sh: |
if [ "${GH_TOKEN}" != "" ] if [ "${APPVEYOR_REPO_TAG}" == "true" -a "${GH_TOKEN}" != "" ]
then then
git config --global credential.helper store git config --global credential.helper store
echo "https://${GH_TOKEN}:x-oauth-basic@github.com" >> ~/.git-credentials echo "https://${GH_TOKEN}:x-oauth-basic@github.com" >> ~/.git-credentials
@ -66,25 +66,28 @@ before_build:
build_script: build_script:
- sh: | - sh: |
mkdir dist if [ "${APPVEYOR_REPO_TAG}" == "true" ]
cp CNAME ./dist then
cd store mkdir dist
chmod 600 fdroid/config.py keystore.jks cp CNAME ./dist
mkdir -p temp/fdroid cd store
TEMP_DIR="$APPVEYOR_BUILD_FOLDER/store/temp/fdroid" chmod 600 fdroid/config.py keystore.jks
cd fdroid mkdir -p temp/fdroid
echo "keypass=\"$FDROID_KEYSTORE_PASSWORD\"" >>config.py TEMP_DIR="$APPVEYOR_BUILD_FOLDER/store/temp/fdroid"
echo "keystorepass=\"$FDROID_KEYSTORE_PASSWORD\"" >>config.py cd fdroid
echo "local_copy_dir=\"$TEMP_DIR\"" >>config.py echo "keypass=\"$FDROID_KEYSTORE_PASSWORD\"" >>config.py
mkdir -p repo echo "keystorepass=\"$FDROID_KEYSTORE_PASSWORD\"" >>config.py
curl -Lo repo/com.x8bit.bitwarden-fdroid.apk \ echo "local_copy_dir=\"$TEMP_DIR\"" >>config.py
https://github.com/bitwarden/mobile/releases/download/v1.22.1/com.x8bit.bitwarden-fdroid.apk mkdir -p repo
fdroid update curl -Lo repo/com.x8bit.bitwarden-fdroid.apk \
fdroid server update https://github.com/bitwarden/mobile/releases/download/$APPVEYOR_REPO_TAG_NAME/com.x8bit.bitwarden-fdroid.apk
cd .. fdroid update
rm -rf temp/fdroid/archive fdroid server update
mv -v temp/fdroid ../dist cd ..
cd $APPVEYOR_BUILD_FOLDER rm -rf temp/fdroid/archive
mv -v temp/fdroid ../dist
cd $APPVEYOR_BUILD_FOLDER
fi
- ps: | - ps: |
if($isWindows -and $env:KEYSTORE_DEC_SECRET) { if($isWindows -and $env:KEYSTORE_DEC_SECRET) {
msbuild bitwarden-mobile.sln ` msbuild bitwarden-mobile.sln `
@ -97,7 +100,7 @@ build_script:
on_success: on_success:
- sh: | - sh: |
if [ "${GH_TOKEN}" != "" ] if [ "${APPVEYOR_REPO_TAG}" == "true" -a "${GH_TOKEN}" != "" ]
then then
npm run deploy npm run deploy
fi fi