Skip to content

Commit

Permalink
Merge pull request #603 from mastodon/release-1.4.7
Browse files Browse the repository at this point in the history
Release v1.4.7
  • Loading branch information
MainasuK authored Nov 21, 2022
2 parents 869e447 + 73f7814 commit c296cf3
Show file tree
Hide file tree
Showing 805 changed files with 31,299 additions and 12,798 deletions.
17 changes: 17 additions & 0 deletions .arkana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import_name: 'ArkanaKeys'
namespace: 'Keys'
result_path: 'Dependencies'
flavors:
- AppStore
swift_declaration_strategy: let
should_generate_unit_tests: true
package_manager: spm
environments:
- Debug
- Release
global_secrets:
# nothing
environment_secrets:
# Will lookup for <Key>Debug and <Key>Release env vars (assuming no flavor was declared)
# Mastodon Push Notification Endpoint
- NotificationEndpoint
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Required

# https://<your-domain>/relay-to/development
NotificationEndpointDebug=""

# https://<your-domain>/relay-to/production
NotificationEndpointRelease=""
75 changes: 75 additions & 0 deletions .github/scripts/build-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env bash

set -xeu
set -o pipefail

function finish() {
ditto -c -k --sequesterRsrc --keepParent "${RESULT_BUNDLE_PATH}" "${RESULT_BUNDLE_PATH}.zip"
rm -rf "${RESULT_BUNDLE_PATH}"
}

trap finish EXIT

SDK="${SDK:-iphoneos}"
WORKSPACE="${WORKSPACE:-Mastodon.xcworkspace}"
SCHEME="${SCHEME:-Mastodon}"
CONFIGURATION=${CONFIGURATION:-Release}

BUILD_DIR=${BUILD_DIR:-.build}
ARTIFACT_PATH=${RESULT_PATH:-${BUILD_DIR}/Artifacts}
RESULT_BUNDLE_PATH="${ARTIFACT_PATH}/${SCHEME}.xcresult"
ARCHIVE_PATH=${ARCHIVE_PATH:-${BUILD_DIR}/Archives/${SCHEME}.xcarchive}
DERIVED_DATA_PATH=${DERIVED_DATA_PATH:-${BUILD_DIR}/DerivedData}
EXPORT_OPTIONS_FILE=".github/support/ExportOptions.plist"

WORK_DIR=$(pwd)
API_PRIVATE_KEYS_PATH="${WORK_DIR}/${BUILD_DIR}/private_keys"
API_KEY_FILE="${API_PRIVATE_KEYS_PATH}/api_key.p8"

rm -rf "${RESULT_BUNDLE_PATH}"

rm -rf "${API_PRIVATE_KEYS_PATH}"
mkdir -p "${API_PRIVATE_KEYS_PATH}"
echo -n "${ENV_API_PRIVATE_KEY_BASE64}" | base64 --decode > "${API_KEY_FILE}"

BUILD_NUMBER=$(app-store-connect get-latest-testflight-build-number $ENV_APP_ID --issuer-id $ENV_ISSUER_ID --key-id $ENV_API_KEY_ID --private-key @file:$API_KEY_FILE)
BUILD_NUMBER=$((BUILD_NUMBER+1))
CURRENT_PROJECT_VERSION=${BUILD_NUMBER:-0}

echo "GITHUB_TAG_NAME=build-$CURRENT_PROJECT_VERSION" >> $GITHUB_ENV

agvtool new-version -all $CURRENT_PROJECT_VERSION

xcrun xcodebuild clean \
-workspace "${WORKSPACE}" \
-scheme "${SCHEME}" \
-configuration "${CONFIGURATION}"

xcrun xcodebuild archive \
-workspace "${WORKSPACE}" \
-scheme "${SCHEME}" \
-configuration "${CONFIGURATION}" \
-destination generic/platform=iOS \
-sdk "${SDK}" \
-parallelizeTargets \
-showBuildTimingSummary \
-derivedDataPath "${DERIVED_DATA_PATH}" \
-archivePath "${ARCHIVE_PATH}" \
-resultBundlePath "${RESULT_BUNDLE_PATH}" \
-allowProvisioningUpdates \
-authenticationKeyPath "${API_KEY_FILE}" \
-authenticationKeyID "${ENV_API_KEY_ID}" \
-authenticationKeyIssuerID "${ENV_ISSUER_ID}"

xcrun xcodebuild \
-exportArchive \
-archivePath "${ARCHIVE_PATH}" \
-exportOptionsPlist "${EXPORT_OPTIONS_FILE}" \
-exportPath "${ARTIFACT_PATH}/${SCHEME}.ipa" \
-allowProvisioningUpdates \
-authenticationKeyPath "${API_KEY_FILE}" \
-authenticationKeyID "${ENV_API_KEY_ID}" \
-authenticationKeyIssuerID "${ENV_ISSUER_ID}"

# Zip up the Xcode Archive into Artifacts folder.
ditto -c -k --sequesterRsrc --keepParent "${ARCHIVE_PATH}" "${ARTIFACT_PATH}/${SCHEME}.xcarchive.zip"
2 changes: 1 addition & 1 deletion .github/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ set -eo pipefail

xcodebuild -workspace Mastodon.xcworkspace \
-scheme Mastodon \
-destination "platform=iOS Simulator,name=iPhone SE (2nd generation)" \
-destination "platform=iOS Simulator,name=iPhone SE (2nd generation)" \
clean \
build | xcpretty
7 changes: 3 additions & 4 deletions .github/scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/bin/bash

# workaround https://github.com/CocoaPods/CocoaPods/issues/11355
sed -i '' $'1s/^/source "https:\\/\\/github.com\\/CocoaPods\\/Specs.git"\\\n\\\n/' Podfile
# sed -i '' $'1s/^/source "https:\\/\\/github.com\\/CocoaPods\\/Specs.git"\\\n\\\n/' Podfile

# Install Ruby Bundler
gem install bundler:2.3.11

# Install Ruby Gems
bundle install

# stub keys. DO NOT use in production
bundle exec pod keys set notification_endpoint "<endpoint>"
bundle exec pod keys set notification_endpoint_debug "<endpoint>"
# Setup notification endpoint
bundle exec arkana

bundle exec pod install
10 changes: 10 additions & 0 deletions .github/support/ExportOptions.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>manageAppVersionAndBuildNumber</key>
<true/>
</dict>
</plist>
74 changes: 74 additions & 0 deletions .github/workflows/develop-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build for Develop TestFlight

on:
push:
branches:
- develop
- release*
- ci-test

jobs:
build:
name: Build
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup
env:
NotificationEndpointDebug: ${{ secrets.NotificationEndpointDebug }}
NotificationEndpointRelease: ${{ secrets.NotificationEndpointRelease }}
run: exec ./.github/scripts/setup.sh

- name: Install codemagic-cli-tools
uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: |
pip3 install codemagic-cli-tools
- run: |
codemagic-cli-tools --version || true
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1 # https://github.com/Apple-Actions/import-codesign-certs
with:
keychain: build-p12
p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
p12-password: ${{ secrets.P12_PASSWORD }}

- name: Download Provisioning Profiles
uses: Apple-Actions/download-provisioning-profiles@v1 # https://github.com/Apple-Actions/download-provisioning-profiles
with:
bundle-id: org.joinmastodon.app
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}

- name: Build
env:
ENV_APP_ID: ${{ secrets.APP_ID }}
ENV_ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }}
ENV_API_KEY_ID: ${{ secrets.APPSTORE_KEY_ID }}
ENV_API_PRIVATE_KEY: ${{ secrets.APPSTORE_PRIVATE_KEY }}
ENV_API_PRIVATE_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_KEY_BASE64 }}
run: exec ./.github/scripts/build-release.sh

- name: Upload TestFlight Build
uses: Apple-Actions/upload-testflight-build@master
with:
app-path: .build/Artifacts/Mastodon.ipa/Mastodon.ipa
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}

- name: Tag commit
uses: tvdias/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
tag: "${{ env.GITHUB_TAG_NAME }}"

- name: Clean up keychain and provisioning profile
if: ${{ always() }}
run: |
security delete-keychain build-p12.keychain-db
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- master
- develop
- feature/*
- feature-*
- issue/*
- issue-*
pull_request:
branches:
- develop
Expand All @@ -15,13 +18,14 @@ on:
jobs:
build:
name: CI build
runs-on: macos-11
runs-on: macos-12
steps:
- name: checkout
uses: actions/checkout@v2
- name: force Xcode 13.2.1
run: sudo xcode-select -switch /Applications/Xcode_13.2.1.app
- name: setup
env:
NotificationEndpointDebug: ${{ secrets.NotificationEndpointDebug }}
NotificationEndpointRelease: ${{ secrets.NotificationEndpointRelease }}
run: exec ./.github/scripts/setup.sh
- name: build
run: exec ./.github/scripts/build.sh
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,7 @@ xcuserdata

# Localization/StringsConvertor/input
Localization/StringsConvertor/output
.DS_Store
.DS_Store

env/**/**
!env/.env
18 changes: 0 additions & 18 deletions AppShared/AppShared.h

This file was deleted.

22 changes: 0 additions & 22 deletions AppShared/Info.plist

This file was deleted.

11 changes: 5 additions & 6 deletions Documentation/Acknowledgments.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Acknowledgments

- [Alamofire](https://github.com/Alamofire/Alamofire)
- [AlamofireImage](https://github.com/Alamofire/AlamofireImage)
- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator)
- [Alamofire](https://github.com/Alamofire/Alamofire)
- [Arkana](https://github.com/rogerluan/arkana)
- [CommonOSLog](https://github.com/mainasuk/CommonOSLog)
- [CryptoSwift](https://github.com/krzyzanowskim/CryptoSwift)
- [DateToolSwift](https://github.com/MatthewYork/DateTools)
- [DiffableDataSources](https://github.com/ra1028/DiffableDataSources)
- [DifferenceKit](https://github.com/ra1028/DifferenceKit)
- [FLAnimatedImage](https://github.com/Flipboard/FLAnimatedImage)
- [FLEX](https://github.com/FLEXTool/FLEX)
- [FPSIndicator](https://github.com/MainasuK/FPSIndicator)
Expand All @@ -26,10 +25,10 @@
- [SwiftGen](https://github.com/SwiftGen/SwiftGen)
- [SwiftUI-Introspect](https://github.com/siteline/SwiftUI-Introspect)
- [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON)
- [Tabman](https://github.com/uias/Tabman)
- [TabBarPager](https://github.com/TwidereProject/TabBarPager)
- [TwidereX-iOS](https://github.com/TwidereProject/TwidereX-iOS)
- [Tabman](https://github.com/uias/Tabman)
- [ThirdPartyMailer](https://github.com/vtourraine/ThirdPartyMailer)
- [TOCropViewController](https://github.com/TimOliver/TOCropViewController)
- [TwidereX-iOS](https://github.com/TwidereProject/TwidereX-iOS)
- [TwitterProfile](https://github.com/OfTheWolf/TwitterProfile)
- [UITextView-Placeholder](https://github.com/devxoul/UITextView-Placeholder)
- [UITextView-Placeholder](https://github.com/devxoul/UITextView-Placeholder)
18 changes: 9 additions & 9 deletions Documentation/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Contributing

- File the issue for bug report and feature request
- File an issue to report a bug or feature request
- Translate the project in our [Crowdin](https://crowdin.com/project/mastodon-for-ios) project
- Make the Pull Request to contribute

## Bug Report
File the issue about the bug. Make sure you are installing the latest version app from TestFlight or App Store.
File an issue about the bug or feature request. Make sure you are installing the latest version of the app from TestFlight or App Store.

## Translation
[![Crowdin](https://badges.crowdin.net/mastodon-for-ios/localized.svg)](https://crowdin.com/project/mastodon-for-ios)

The translation will update regularly. Please request language if not listed via issue.
The translation will update regularly. Please request the language if it is not listed via an issue.

## Pull Request

You can make a pull request directly with small block code changes for bugfix or feature implementations. Before making a pull request with hundred lines of changes to this repository, please first discuss the change you wish to make via issue.
You can create a pull request directly with small block code changes for bugfix or feature implementations. Before making a pull request with hundred lines of changes to this repository, please first discuss the change you wish to make via an issue.

Also, there are lots of existing feature request issues that could be a good-first-issue discussing place.

Follow the git-flow pattern to make your pull request.

1. Ensure you are checkout on the `develop` branch.
2. Write your codes and test them on **iPad and iPhone**.
3. Merge the `develop` into your branch then make a Pull Request. Please merge the branch and resolve any conflicts when the `develop` updates. **Do not force push your codes.**
4. Make sure the permission for your folk is open to the reviewer. Code style fix, conflict resolution, and other changes may be committed by the reviewer directly.
1. Ensure you have started a new branch based on the `develop` branch.
2. Write your changes and test them on **iPad and iPhone**.
3. Merge the `develop` branch into your branch then make a Pull Request. Please merge the branch and resolve any conflicts if `develop` updates. **Do not force push your commits.**
4. Make sure the permission for your fork is open to the reviewer. Code style fix, conflict resolution, and other changes may be committed by the reviewer directly.
5. Request a code review and wait for approval. The PR will be merged when it is approved.

## Documentation
The documents for this app is list under the [Documentation](../Documentation/) folder. We are also welcome contributions for documentation.
The documentation for this app is listed under the [Documentation](../Documentation/) folder. We are also welcoming contributions for documentation.
Loading

0 comments on commit c296cf3

Please sign in to comment.