From bce26946943a0078ed5db64ef73126f43cf6bd10 Mon Sep 17 00:00:00 2001 From: Davide Date: Tue, 24 Sep 2024 17:51:01 +0200 Subject: [PATCH] Fix lookup of pilot metadata (#601) - [x] Fetch app version/build without agvtool, unavailable on ubuntu-latest - [x] Move TestFlight preface to a repository variable - [x] Move TestFlight URL to README instead --- .github/workflows/release.yml | 9 ++++++++- CHANGELOG.txt.testflight | 14 -------------- README.md | 5 +++-- ci/build-number.sh | 7 +++++++ ci/version-number.sh | 7 +++++++ fastlane/Fastfile | 8 ++------ 6 files changed, 27 insertions(+), 23 deletions(-) delete mode 100644 CHANGELOG.txt.testflight create mode 100755 ci/build-number.sh create mode 100755 ci/version-number.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f70f89a..250d9be3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,7 @@ env: APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }} FASTLANE_USERNAME: ${{ secrets.FASTLANE_USERNAME }} FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} + XCODEPROJ: "Passepartout.xcodeproj/project.pbxproj" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -48,13 +49,19 @@ jobs: needs: build_upload environment: name: public_beta - url: "https://testflight.apple.com/join/K71mtLjZ" steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: bundler-cache: true + - name: Fetch build metadata + run: | + echo "PILOT_APP_VERSION=`ci/version-number.sh $XCODEPROJ`" >> $GITHUB_ENV + echo "PILOT_BUILD_NUMBER=`ci/build-number.sh $XCODEPROJ`" >> $GITHUB_ENV - name: Publish on TestFlight + env: + PILOT_GROUPS: ${{ vars.PILOT_GROUPS }} + PILOT_NOTIFY_EXTERNAL_TESTERS: ${{ vars.PILOT_NOTIFY_EXTERNAL_TESTERS }} run: | #PLATFORMS=("iOS" "macOS" "tvOS") PLATFORMS=("iOS" "macOS") diff --git a/CHANGELOG.txt.testflight b/CHANGELOG.txt.testflight deleted file mode 100644 index bf7f45eb..00000000 --- a/CHANGELOG.txt.testflight +++ /dev/null @@ -1,14 +0,0 @@ -Do not worry, your former profiles ARE NOT LOST. - -You are not seeing them just because they were not -migrated (yet) to version 3.0.0. Downgrading the app -to the App Store version would restore them. - -You may also notice that several features are missing, -but they will be gradually reintroduced before hitting -the App Store. - -Anything else, please report to beta@passepartoutvpn.app - -### Changes - diff --git a/README.md b/README.md index 73ccfcb6..93e8e312 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Passepartout is your go-to app for VPN and privacy. [OpenVPN®][openvpn] and [WireGuard®][wireguard] client for Apple platforms, the OpenVPN stack also implements the [Tunnelblick XOR patch][openvpn-xor-patch]. [![Join Reddit](https://img.shields.io/badge/discuss-Reddit-orange.svg)][about-reddit] -[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fpassepartoutvpn.app%2F&via=keeshux&text=Passepartout%20is%20a%20user-friendly%2C%20open-source%20VPN%20client%20for%20%23iOS%20and%20%23macOS) +[![Join TestFlight](https://img.shields.io/badge/beta-Testflight-blue.svg)][about-testflight] ## Overview @@ -161,7 +161,7 @@ This product includes software developed by the OpenSSL Project for use in the O A _huge_ credit goes to: - My tiny group of 3 private beta testers -- The 3600+ public testers using the beta on a daily basis +- The 9000+ public testers using the beta on a daily basis - The continued support and feedback from the [Passepartout community on Reddit][about-reddit] - The overall patience of users affected by my bugs that actively collaborate in resolving them - All those who contributed to the amazingly high rating on the App Store @@ -225,3 +225,4 @@ Website: [passepartoutvpn.app][about-website] ([FAQ][about-faq]) [about-website]: https://passepartoutvpn.app [about-faq]: https://passepartoutvpn.app/faq/ [about-reddit]: https://www.reddit.com/r/passepartout +[about-testflight]: https://testflight.apple.com/join/K71mtLjZ diff --git a/ci/build-number.sh b/ci/build-number.sh new file mode 100755 index 00000000..8bb4b765 --- /dev/null +++ b/ci/build-number.sh @@ -0,0 +1,7 @@ +#!/bin/sh +if [ -z "$1" ]; then + echo "Path to Xcode project required" + exit 1 +fi +XCODEPROJ="$1" +grep CURRENT_PROJECT_VERSION $XCODEPROJ | uniq | sed -E "s/^.*CURRENT_PROJECT_VERSION = ([0-9]+);/\1/" | tr -d '\n' diff --git a/ci/version-number.sh b/ci/version-number.sh new file mode 100755 index 00000000..197a2f75 --- /dev/null +++ b/ci/version-number.sh @@ -0,0 +1,7 @@ +#!/bin/sh +if [ -z "$1" ]; then + echo "Path to Xcode project required" + exit 1 +fi +XCODEPROJ="$1" +grep MARKETING_VERSION $XCODEPROJ | uniq | sed -E "s/^.*MARKETING_VERSION = ([0-9]\.[0-9]\.[0-9]);/\1/" | tr -d '\n' diff --git a/fastlane/Fastfile b/fastlane/Fastfile index a1406ab4..30cc1283 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -46,9 +46,9 @@ end desc "Push a new beta build to TestFlight" lane :beta do - prelog = File.read("../#{logname}.testflight") + preface = ENV["TESTFLIGHT_PREFACE"] log = File.read("../#{logname}") - changelog = prelog + "\n\n" + log + changelog = preface + "\n\n" + log match(type: "appstore") gym( clean: true, @@ -64,11 +64,7 @@ end desc "Distribute to Public Beta" lane :public_beta do - version = get_version_number - build = get_build_number pilot( - app_version: version, - build_number: build, distribute_only: true, distribute_external: true, notify_external_testers: true