https://install.appcenter.ms/orgs/Vibra/apps/Vibra_android_beta/releases/17

appcenter-pre-build.sh
appcenter-post-build.sh

  • 发送丁丁推送

pre-build.sh

  1. #!/usr/bin/env bash
  2. # Example: Change bundle name of an iOS app for non-production
  3. if [ "$APPCENTER_BRANCH" != "main" ];
  4. then
  5. plutil -replace CFBundleDisplayName -string "\$(PRODUCT_NAME) Beta" $APPCENTER_SOURCE_DIRECTORY/MyApp/Info.plist
  6. fi

post-build.sh

  1. echo "get the message of the last commit "
  2. COMMIT_MESSAGE=$(git log -1 HEAD --pretty=format:%s --no-merges)
  3. if [ "$APP_RELEASE" == "store" ]
  4. then
  5. MESSAGE="kikitrade testflight准备发布,请等待10分钟后打开testflight安装试用或者留意苹果消息推送, 版本号:$VERSION_NAME ($APPCENTER_BUILD_ID) , 更新日志:$COMMIT_MESSAGE"
  6. fi
  7. if [ "$AGENT_JOBSTATUS" == "Succeeded" ]; then
  8. HOCKEYAPP_API_TOKEN={API_Token}
  9. HOCKEYAPP_APP_ID={APP_ID}
  10. # Example: Upload main branch app binary to HockeyApp using the API
  11. if [ "$APPCENTER_BRANCH" == "main" ];
  12. then
  13. curl \
  14. -F "status=2" \
  15. -F "ipa=@$APPCENTER_OUTPUT_DIRECTORY/MyApps.ipa" \
  16. -H "X-HockeyAppToken: $HOCKEYAPP_API_TOKEN" \
  17. https://rink.hockeyapp.net/api/2/apps/$HOCKEYAPP_APP_ID/app_versions/upload
  18. else
  19. echo "Current branch is $APPCENTER_BRANCH"
  20. fi
  21. fi

environment

https://docs.microsoft.com/en-us/appcenter/build/custom/variables/

  1. "$APPCENTER_BRANCH" == "beta"
  2. "$APPCENTER_PLATFORM" == "ios"