diff --git a/.github/actions/archive/action.yml b/.github/actions/archive/action.yml index c34bd3ce..37282e19 100644 --- a/.github/actions/archive/action.yml +++ b/.github/actions/archive/action.yml @@ -26,9 +26,12 @@ runs: run: | echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8 - xcodebuild archive \ + xcodebuild clean archive \ -allowProvisioningUpdates \ -allowProvisioningDeviceRegistration \ + -skipPackagePluginValidation \ + -skipMacroValidation \ + -onlyUsePackageVersionsFromResolvedFile \ -authenticationKeyID ${{ inputs.app-store-key-id }} \ -authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \ -authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \ @@ -38,6 +41,4 @@ runs: -archivePath '${{ inputs.archive-path }}' \ -resultBundlePath BuildResults.xcresult - ./Tools/xcresulttool-github BuildResults.xcresult - rm -rf AuthKey_${{ inputs.app-store-key-id }}.p8 diff --git a/.github/actions/build-for-testing/action.yml b/.github/actions/build-for-testing/action.yml index 2c66963a..084ba81d 100644 --- a/.github/actions/build-for-testing/action.yml +++ b/.github/actions/build-for-testing/action.yml @@ -18,7 +18,7 @@ inputs: runs: using: composite steps: - - name: Cache Swift Packages + - name: Xcode Cache uses: actions/cache@v3 with: path: | diff --git a/.github/actions/export/action.yml b/.github/actions/export/action.yml index 635732cb..8f891bed 100644 --- a/.github/actions/export/action.yml +++ b/.github/actions/export/action.yml @@ -1,4 +1,4 @@ -name: Notarize +name: Export inputs: app-store-key: description: App Store key in PEM PKCS#8 format @@ -24,8 +24,7 @@ inputs: runs: using: composite steps: - - id: notarize - shell: bash + - shell: bash working-directory: Apple run: | echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8 diff --git a/.github/actions/notarize/action.yml b/.github/actions/notarize/action.yml new file mode 100644 index 00000000..290ed868 --- /dev/null +++ b/.github/actions/notarize/action.yml @@ -0,0 +1,58 @@ +name: Notarize +inputs: + app-store-key: + description: App Store key in PEM PKCS#8 format + required: true + app-store-key-id: + description: App Store key ID + required: true + app-store-key-issuer-id: + description: App Store key issuer ID + required: true + archive-path: + description: Xcode archive path + required: true + export-path: + description: The path to export the archive to + required: true +outputs: + notarized-app: + description: The compressed and notarized app + value: ${{ steps.notarize.outputs.notarized-app }} +runs: + using: composite + steps: + - id: notarize + shell: bash + working-directory: Apple + run: | + echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8 + + echo '{"destination":"upload","method":"developer-id"}' \ + | plutil -convert xml1 -o ExportOptions.plist - + + xcodebuild \ + -exportArchive \ + -allowProvisioningUpdates \ + -allowProvisioningDeviceRegistration \ + -authenticationKeyID ${{ inputs.app-store-key-id }} \ + -authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \ + -authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \ + -archivePath '${{ inputs.archive-path }}' \ + -exportOptionsPlist ExportOptions.plist + + until xcodebuild \ + -exportNotarizedApp \ + -allowProvisioningUpdates \ + -allowProvisioningDeviceRegistration \ + -authenticationKeyID ${{ inputs.app-store-key-id }} \ + -authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \ + -authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \ + -archivePath '${{ inputs.archive-path }}' \ + -exportPath ${{ inputs.export-path }} + do + echo "Failed to export app, trying again in 10s..." + sleep 10 + done + + rm -rf AuthKey_${{ inputs.app-store-key-id }}.p8 ExportOptions.plist diff --git a/.github/workflows/build-apple.yml b/.github/workflows/build-apple.yml index da0f56a6..1c00042d 100644 --- a/.github/workflows/build-apple.yml +++ b/.github/workflows/build-apple.yml @@ -12,7 +12,7 @@ concurrency: jobs: build: name: Build App (${{ matrix.platform }}) - runs-on: macos-13 + runs-on: macos-14 strategy: fail-fast: false matrix: @@ -53,7 +53,6 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: stable targets: ${{ join(matrix.rust-targets, ', ') }} - name: Build id: build diff --git a/.github/workflows/release-apple.yml b/.github/workflows/release-apple.yml index 3ea185de..a47352cf 100644 --- a/.github/workflows/release-apple.yml +++ b/.github/workflows/release-apple.yml @@ -1,65 +1,120 @@ name: Build Apple Release -on: - release: - types: - - created +on: workflow_dispatch +concurrency: + group: ${{ github.workflow }} jobs: build: - name: Build ${{ matrix.configuration['platform'] }} Release - runs-on: macos-13 + name: Build ${{ matrix.platform }} Release + runs-on: macos-14 + permissions: + contents: write strategy: fail-fast: false matrix: - configuration: - - scheme: App (iOS) - destination: generic/platform=iOS + include: + - destination: generic/platform=iOS platform: iOS - method: ad-hoc - artifact-file: Apple/Release/Burrow.ipa - - scheme: App (macOS) - destination: generic/platform=macOS + rust-targets: + - aarch64-apple-ios + - destination: generic/platform=macOS platform: macOS - method: mac-application - artifact-file: Burrow.app.txz + rust-targets: + - x86_64-apple-darwin + - aarch64-apple-darwin env: DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer + GH_TOKEN: ${{ github.token }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ssh-key: ${{ secrets.DEPLOY_KEY }} submodules: recursive + fetch-depth: 0 - name: Import Certificate uses: ./.github/actions/import-cert with: certificate: ${{ secrets.DEVELOPER_CERT }} password: ${{ secrets.DEVELOPER_CERT_PASSWORD }} + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ join(matrix.rust-targets, ', ') }} - name: Archive uses: ./.github/actions/archive with: - scheme: ${{ matrix.configuration['scheme'] }} - destination: ${{ matrix.configuration['destination'] }} + scheme: App + destination: ${{ matrix.destination }} app-store-key: ${{ secrets.APPSTORE_KEY }} app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }} app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }} archive-path: Burrow.xcarchive - - name: Export Locally + - name: Upload uses: ./.github/actions/export with: - method: ${{ matrix.configuration['method'] }} + method: app-store + destination: upload + app-store-key: ${{ secrets.APPSTORE_KEY }} + app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }} + app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }} + archive-path: Burrow.xcarchive + export-path: Release + - name: Notarize + if: ${{ matrix.platform == 'macOS' }} + uses: ./.github/actions/notarize + with: + app-store-key: ${{ secrets.APPSTORE_KEY }} + app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }} + app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }} + archive-path: Burrow.xcarchive + - name: Export IPA + if: ${{ matrix.platform == 'iOS' }} + uses: ./.github/actions/export + with: + method: ad-hoc destination: export app-store-key: ${{ secrets.APPSTORE_KEY }} app-store-key-id: ${{ secrets.APPSTORE_KEY_ID }} app-store-key-issuer-id: ${{ secrets.APPSTORE_KEY_ISSUER_ID }} archive-path: Burrow.xcarchive export-path: Release - - name: Compress - if: ${{ matrix.configuration['platform'] == 'macOS' }} + - name: Compress (iOS) + if: ${{ matrix.platform == 'iOS' }} shell: bash - run: tar --options xz:compression-level=9 -C Apple/Release -cJf Burrow.app.txz ./ - - name: Attach Artifact - uses: SierraSoftworks/gh-releases@v1.0.6 + run: | + cp Apple/Release/Burrow.ipa -o Burrow.ipa + aa archive -a lzma -b 8m -d Apple -subdir Burrow.xcarchive -o Burrow-${{ matrix.platform }}.xcarchive.aar + rm -rf Apple/Release + - name: Compress (macOS) + if: ${{ matrix.platform == 'macOS' }} + shell: bash + run: | + aa archive -a lzma -b 8m -d Apple/Release -subdir Burrow.app -o Burrow.app.aar + aa archive -a lzma -b 8m -d Apple -subdir Burrow.xcarchive -o Burrow-${{ matrix.platform }}.xcarchive.aar + rm -rf Apple/Release + - name: Increment Build Number + id: version + shell: bash + run: | + BUILD_NUMBER=$(Tools/version.sh increment) + echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_OUTPUT + - name: Attach Artifacts (iOS) + if: ${{ matrix.platform == 'iOS' }} + uses: SierraSoftworks/gh-releases@v1.0.7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }} + overwrite: 'true' + files: | + Burrow.ipa + Burrow-${{ matrix.platform }}.xcarchive.aar + - name: Attach Artifacts (macOS) + if: ${{ matrix.platform == 'macOS' }} + uses: SierraSoftworks/gh-releases@v1.0.7 with: token: ${{ secrets.GITHUB_TOKEN }} - overwrite: 'false' - files: ${{ matrix.configuration['artifact-file'] }} + overwrite: 'true' + files: | + Burrow.aap.aar + Burrow-${{ matrix.platform }}.xcarchive.aar + release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }} diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release-linux.yml new file mode 100644 index 00000000..53019a4e --- /dev/null +++ b/.github/workflows/release-linux.yml @@ -0,0 +1,32 @@ +name: Build Linux Release +on: + release: + types: + - created +jobs: + appimage: + name: Build AppImage + runs-on: ubuntu-latest + container: docker + steps: + - uses: actions/checkout@v4 + - name: Build AppImage + run: | + docker build -t appimage-builder . -f burrow-gtk/build-aux/Dockerfile + docker create --name temp appimage-builder + docker cp temp:/app/burrow-gtk/build-appimage/Burrow-x86_64.AppImage . + docker rm temp + - name: Get Build Number + id: version + shell: bash + run: | + BUILD_NUMBER=$(Tools/version.sh) + echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_OUTPUT + - name: Attach Artifacts + uses: SierraSoftworks/gh-releases@v1.0.7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release_tag: builds/${{ steps.version.outputs.BUILD_NUMBER }} + overwrite: 'true' + files: | + Burrow-x86_64.AppImage diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/100.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/100.png new file mode 100644 index 00000000..f86c1399 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/100.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/1024.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/1024.png new file mode 100644 index 00000000..872c9cee Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/1024.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/114.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/114.png new file mode 100644 index 00000000..3bb278dc Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/114.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/120.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/120.png new file mode 100644 index 00000000..185615e4 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/120.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/128.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/128.png new file mode 100644 index 00000000..51bd97c4 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/128.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/144.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/144.png new file mode 100644 index 00000000..b05e3711 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/144.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/152.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/152.png new file mode 100644 index 00000000..c95ea8ad Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/152.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/16.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/16.png new file mode 100644 index 00000000..3cb15a51 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/16.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/167.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/167.png new file mode 100644 index 00000000..a3ad6a29 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/167.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/172.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/172.png new file mode 100644 index 00000000..9f3bdb4f Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/172.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/180.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/180.png new file mode 100644 index 00000000..53c12373 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/180.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/196.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/196.png new file mode 100644 index 00000000..ea95961f Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/196.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/20.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/20.png new file mode 100644 index 00000000..aec8236e Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/20.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/216.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/216.png new file mode 100644 index 00000000..9f0e3ced Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/216.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/256.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/256.png new file mode 100644 index 00000000..a82ce93b Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/256.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/29.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/29.png new file mode 100644 index 00000000..8dc25c11 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/29.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/32.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/32.png new file mode 100644 index 00000000..655a4242 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/32.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/40.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/40.png new file mode 100644 index 00000000..1f7f5e9b Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/40.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/48.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/48.png new file mode 100644 index 00000000..4a67ebf1 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/48.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/50.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/50.png new file mode 100644 index 00000000..88985d89 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/50.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/512.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/512.png new file mode 100644 index 00000000..e5cbf6a4 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/512.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/55.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/55.png new file mode 100644 index 00000000..dc079ea3 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/55.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/57.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/57.png new file mode 100644 index 00000000..de4fddce Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/57.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/58.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/58.png new file mode 100644 index 00000000..961adad2 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/58.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/60.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/60.png new file mode 100644 index 00000000..2a9e9397 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/60.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/64.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/64.png new file mode 100644 index 00000000..c67e407c Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/64.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/72.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/72.png new file mode 100644 index 00000000..d09aebe2 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/72.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/76.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/76.png new file mode 100644 index 00000000..3e649b67 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/76.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/80.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/80.png new file mode 100644 index 00000000..6dad29fe Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/80.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/87.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/87.png new file mode 100644 index 00000000..a8ccb388 Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/87.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/88.png b/Apple/App/Assets.xcassets/AppIcon.appiconset/88.png new file mode 100644 index 00000000..b1a478af Binary files /dev/null and b/Apple/App/Assets.xcassets/AppIcon.appiconset/88.png differ diff --git a/Apple/App/Assets.xcassets/AppIcon.appiconset/Contents.json b/Apple/App/Assets.xcassets/AppIcon.appiconset/Contents.json index 532cd729..f78687a2 100644 --- a/Apple/App/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Apple/App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,59 +1,340 @@ { "images" : [ { - "idiom" : "universal", - "platform" : "ios", + "filename" : "40.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "60.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "filename" : "29.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "58.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "87.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "filename" : "80.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "120.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "filename" : "57.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "57x57" + }, + { + "filename" : "114.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "57x57" + }, + { + "filename" : "120.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "filename" : "180.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "filename" : "20.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "filename" : "40.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "29.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "58.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "40.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "filename" : "80.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "50.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "50x50" + }, + { + "filename" : "100.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "50x50" + }, + { + "filename" : "72.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "72x72" + }, + { + "filename" : "144.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "72x72" + }, + { + "filename" : "76.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "filename" : "152.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "filename" : "167.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "filename" : "1024.png", + "idiom" : "ios-marketing", + "scale" : "1x", "size" : "1024x1024" }, { + "filename" : "16.png", "idiom" : "mac", "scale" : "1x", "size" : "16x16" }, { + "filename" : "32.png", "idiom" : "mac", "scale" : "2x", "size" : "16x16" }, { + "filename" : "32.png", "idiom" : "mac", "scale" : "1x", "size" : "32x32" }, { + "filename" : "64.png", "idiom" : "mac", "scale" : "2x", "size" : "32x32" }, { + "filename" : "128.png", "idiom" : "mac", "scale" : "1x", "size" : "128x128" }, { + "filename" : "256.png", "idiom" : "mac", "scale" : "2x", "size" : "128x128" }, { + "filename" : "256.png", "idiom" : "mac", "scale" : "1x", "size" : "256x256" }, { + "filename" : "512.png", "idiom" : "mac", "scale" : "2x", "size" : "256x256" }, { + "filename" : "512.png", "idiom" : "mac", "scale" : "1x", "size" : "512x512" }, { + "filename" : "1024.png", "idiom" : "mac", "scale" : "2x", "size" : "512x512" + }, + { + "filename" : "48.png", + "idiom" : "watch", + "role" : "notificationCenter", + "scale" : "2x", + "size" : "24x24", + "subtype" : "38mm" + }, + { + "filename" : "55.png", + "idiom" : "watch", + "role" : "notificationCenter", + "scale" : "2x", + "size" : "27.5x27.5", + "subtype" : "42mm" + }, + { + "filename" : "58.png", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "87.png", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "watch", + "role" : "notificationCenter", + "scale" : "2x", + "size" : "33x33", + "subtype" : "45mm" + }, + { + "filename" : "80.png", + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "40x40", + "subtype" : "38mm" + }, + { + "filename" : "88.png", + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "44x44", + "subtype" : "40mm" + }, + { + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "46x46", + "subtype" : "41mm" + }, + { + "filename" : "100.png", + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "50x50", + "subtype" : "44mm" + }, + { + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "51x51", + "subtype" : "45mm" + }, + { + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "54x54", + "subtype" : "49mm" + }, + { + "filename" : "172.png", + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "86x86", + "subtype" : "38mm" + }, + { + "filename" : "196.png", + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "98x98", + "subtype" : "42mm" + }, + { + "filename" : "216.png", + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "108x108", + "subtype" : "44mm" + }, + { + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "117x117", + "subtype" : "45mm" + }, + { + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "129x129", + "subtype" : "49mm" + }, + { + "filename" : "1024.png", + "idiom" : "watch-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { diff --git a/Apple/Burrow.xcodeproj/project.pbxproj b/Apple/Burrow.xcodeproj/project.pbxproj index 8717a30f..1adfda4d 100644 --- a/Apple/Burrow.xcodeproj/project.pbxproj +++ b/Apple/Burrow.xcodeproj/project.pbxproj @@ -30,7 +30,6 @@ D0BCC5FD2A086D4700AD070D /* NetworkExtension+Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0BCC5FC2A086D4700AD070D /* NetworkExtension+Async.swift */; }; D0BCC6082A0981FE00AD070D /* Tunnel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B98FC629FDC5B5004E7149 /* Tunnel.swift */; }; D0BCC6092A09A03E00AD070D /* libburrow.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D0BCC6032A09535900AD070D /* libburrow.a */; }; - D0BCC60A2A09A0B800AD070D /* build-rust.sh in Resources */ = {isa = PBXBuildFile; fileRef = D0B98FBF29FD8072004E7149 /* build-rust.sh */; }; D0FAB5922B818A5900F6A84B /* NetworkExtensionTunnel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0FAB5912B818A5900F6A84B /* NetworkExtensionTunnel.swift */; }; D0FAB5962B818B2900F6A84B /* TunnelButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0FAB5952B818B2900F6A84B /* TunnelButton.swift */; }; D0FAB5982B818B8200F6A84B /* TunnelStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0FAB5972B818B8200F6A84B /* TunnelStatusView.swift */; }; @@ -103,6 +102,7 @@ D020F66929E4AA74002790F6 /* App-macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "App-macOS.entitlements"; sourceTree = ""; }; D032E6512B8A79C20006B8AD /* HackClub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HackClub.swift; sourceTree = ""; }; D032E6532B8A79DA0006B8AD /* WireGuard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WireGuard.swift; sourceTree = ""; }; + D04A3E1D2BAF465F0043EC85 /* Version.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = ""; }; D05B9F7229E39EEC008CB1F9 /* Burrow.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Burrow.app; sourceTree = BUILT_PRODUCTS_DIR; }; D05B9F7529E39EEC008CB1F9 /* BurrowApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BurrowApp.swift; sourceTree = ""; }; D05B9F7729E39EEC008CB1F9 /* BurrowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BurrowView.swift; sourceTree = ""; }; @@ -185,6 +185,7 @@ D020F64A29E4A452002790F6 /* App.xcconfig */, D020F66329E4A703002790F6 /* Extension.xcconfig */, D020F64029E4A1FF002790F6 /* Compiler.xcconfig */, + D04A3E1D2BAF465F0043EC85 /* Version.xcconfig */, D020F64229E4A1FF002790F6 /* Info.plist */, ); path = Configuration; @@ -384,7 +385,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D0BCC60A2A09A0B800AD070D /* build-rust.sh in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Apple/Configuration/Compiler.xcconfig b/Apple/Configuration/Compiler.xcconfig index aa486a7c..87b55fe6 100644 --- a/Apple/Configuration/Compiler.xcconfig +++ b/Apple/Configuration/Compiler.xcconfig @@ -1,4 +1,5 @@ #include "Identity.xcconfig" +#include "Version.xcconfig" SDKROOT = auto ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES @@ -12,7 +13,6 @@ SUPPORTS_MACCATALYST = NO ALWAYS_SEARCH_USER_PATHS = NO PRODUCT_NAME = $(TARGET_NAME:c99extidentifier) PRODUCT_BUNDLE_IDENTIFIER = $(APP_BUNDLE_IDENTIFIER).$(PRODUCT_NAME) -CURRENT_PROJECT_VERSION = 1 MARKETING_VERSION = 0.1 SKIP_INSTALL = YES diff --git a/Apple/Configuration/Version.xcconfig b/Apple/Configuration/Version.xcconfig new file mode 100644 index 00000000..e69de29b diff --git a/Tools/version.sh b/Tools/version.sh new file mode 100755 index 00000000..3840fb38 --- /dev/null +++ b/Tools/version.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +export PATH="$PATH:/opt/homebrew/bin:/usr/local/bin:/etc/profiles/per-user/$USER/bin" + +set -euo pipefail + +cd "$(dirname "${BASH_SOURCE[0]}")"/.. + +TAG_PREFIX="builds/" + +CURRENT_BUILD=$(git tag --points-at HEAD | tail -n 1) +LATEST_BUILD="$TAG_PREFIX$(git tag -l "builds/[0-9]*" | cut -d'/' -f 2 | sort -n | tail -n 1)" + +LATEST_BUILD_NUMBER=${LATEST_BUILD#$TAG_PREFIX} +if [[ -z $LATEST_BUILD_NUMBER ]]; then + LATEST_BUILD_NUMBER="0" +fi + +if [[ ! -z $LATEST_BUILD && $(git merge-base --is-ancestor $LATEST_BUILD HEAD) -ne 0 ]]; then + echo "error: HEAD is not descended from build $LATEST_BUILD_NUMBER" >&2 + exit 1 +fi + +BUILD_NUMBER=$LATEST_BUILD_NUMBER + +if [[ $# -gt 0 && "$1" == "increment" ]]; then + NEW_BUILD_NUMBER=$((LATEST_BUILD_NUMBER + 1)) + NEW_TAG="$TAG_PREFIX$NEW_BUILD_NUMBER" + BUILD_NUMBER=$NEW_BUILD_NUMBER + + git tag $NEW_TAG + git push --quiet origin $NEW_TAG + gh release create "$NEW_TAG" -t "Build $BUILD_NUMBER" --verify-tag --generate-notes >/dev/null +fi + +if [[ -z $(grep $BUILD_NUMBER Apple/Configuration/Version.xcconfig 2>/dev/null) ]]; then + echo "CURRENT_PROJECT_VERSION = $BUILD_NUMBER" > Apple/Configuration/Version.xcconfig + git update-index --assume-unchanged Apple/Configuration/Version.xcconfig +fi + +echo $BUILD_NUMBER