sh Android / Gradle / Script - 组装应用程序并使用https://gist.github.com/danielgomezrico/bfb2fb5732d760e766f

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Android / Gradle / Script - 组装应用程序并使用https://gist.github.com/danielgomezrico/bfb2fb5732d760e766f相关的知识,希望对你有一定的参考价值。

#!/usr/bin/env bash
#
# Assemble the app, backup it and upload the apks to crashlytics
#

if [ $1 = '--help' ] || [ $1 = '--h' ] || [ $1 = '-help' ] || [ $1 = '-h' ] || [ $1 = '-?' ] ; then
    echo "Usage: sh assemble.sh [option]"
    echo ""
    echo "Options:"
    echo "-?, -h, --h, -help, --help            print help."
    echo "-releaseStaging                       release the staging apk to fabric."
    echo "-releaseProduction                    release the production apk to fabric."
    exit 0
fi

echo "Assembling apks..."
sh gradlew assemble

if [ $? -eq 0 ]; then
  echo "Trying to backup apks..."
  sh gradlew backupApks

  if [ $1 = '-releaseStaging' ]; then
    echo "Releasing staging..."
    sh gradlew crashlyticsUploadDistributionDevStaging
  fi

  if [ $1 = '-releaseProduction' ]; then
    echo "Releasing prod..."
    sh gradlew crashlyticsUploadDistributionProdRelease
  fi
else
    echo "Something went wrong, no backup or released can be done."
fi

以上是关于sh Android / Gradle / Script - 组装应用程序并使用https://gist.github.com/danielgomezrico/bfb2fb5732d760e766f的主要内容,如果未能解决你的问题,请参考以下文章

sh Gradle / Bash - 将所有env变量复制到app / gradle.properties(用于从travis或circle CI复制秘密env变量以构建android proj

sh Gradle / Bash - 将所有env变量复制到app / gradle.properties(用于从travis或circle CI复制秘密env变量以构建android proj

sh Gradle / Bash - 将所有env变量复制到app / gradle.properties(用于从travis或circle CI复制秘密env变量以构建android proj

sh Gradle / Bash - 将所有env变量复制到app / gradle.properties(用于从travis或circle CI复制秘密env变量以构建android proj

sh Gradle / Bash - 将所有env变量复制到app / gradle.properties(用于从travis或circle CI复制秘密env变量以构建android proj

sh Gradle / Bash - 将所有env变量复制到app / gradle.properties(用于从travis或circle CI复制秘密env变量以构建android proj