Skip to content

Commit

Permalink
Update deploy instructions in readme
Browse files Browse the repository at this point in the history
- Update package.json with additional gitVersionFile script
- Update deploy-config.sample.json with new params
  • Loading branch information
paullinator committed Jul 25, 2023
1 parent 32a7639 commit 6e8e00b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 7 deletions.
47 changes: 42 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ Otherwise, to get an APK, do:

### Build release version of app

First, run `yarn update-version` to copy the `package.json` version into the native project files, and to assign a unique build number.

#### iOS

- Open `edge-react-gui/ios/edge.xcworkspace` in Xcode
Expand All @@ -98,18 +96,41 @@ First, run `yarn update-version` to copy the `package.json` version into the nat

---

## Deploying (macOS Only)
## Deploying (MacOS Only)

This repo includes several utility scripts that can be used in a CI/CD
environment to build and deploy a release version of the app. The
included `Jenkinsfile` utilizes all the scripts but you are free to
use them in your own CI environment.

### Update the version file

Set `BUILD_REPO_URL` to the URL of an empty Git repo that will hold a version
file that will be auto updated to increment the version and build number. Then
run the following to update a local `release-version.json` file

yarn gitVersionFile

Update the project files based on the version in `release-version.json`

yarn updateVersion


### Build, sign, and deploy

The included `deploy.js` is a script to automate building, signing, and deploying release builds of Edge. It provides the following:
The included `deploy.ts` is a script to automate building, signing, and deploying release builds of Edge. It provides the following:

- Auto sign Android APK with Android keystore files
- Auto sign iOS IPA with provisioning profiles
- Build release version of iOS and Android
- Upload iOS IPA and Android APK files to AppCenter for developer testing

### To Use

- Run `yarn update-version` to set up your build number & version.
- Set the env var KEYCHAIN_PASSWORD to the keychain password of the current user
- Copy the `deploy-config.sample.json` to `deploy-config.json` and edit the parameters accordingly. You'll need a HockeyApp account to get ids and keys
- Download a copy of the Google Bundle tool (https://github.com/google/bundletool/releases)
- Set the `bundleToolPath` in `deploy-config.json` to the path to the bundle tool `.jar` file
- Put any Android keystore files into `edge-react-gui/keystores/`
- If using Firebase, put your account's `google-services.json` and `GoogleService-Info.plist` into `edge-react-gui/`
- Install xcpretty `sudo gem install xcpretty`
Expand All @@ -121,6 +142,22 @@ yarn deploy edge ios master
yarn deploy edge android master
```

## Fastlane support

This repo supports utilizing Fastlane to automate updates to iOS Provisioning
Profiles. To use Fastlane, set the following environment variables and run
`yarn deploy` as mentioned above

BUILD_REPO_URL // Git repo used to store encrypted provisioning
// keys.
// Will be shared with the gitVersionFile.ts script
FASTLANE_USER // Apple ID email
FASTLANE_PASSWORD // Apple ID password
GITHUB_SSH_KEY // (Optional) SSH Key file to use when accessing
// BUILD_REPO_URL
MATCH_KEYCHAIN_PASSWORD // Password to unlock the current users keychain
MATCH_PASSWORD // Password used to encrypt profile information
// before being saved to the BUILD_REPO_URL
---

## Debugging
Expand Down
6 changes: 5 additions & 1 deletion deploy-config.sample.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{
"edge": {
"productName": "Edge Wallet",
"xcodeProject": "edge.xcodeproj",
"xcodeWorkspace": "edge.xcworkspace",
"xcodeScheme": "edge",
"androidKeyStore": "edge-release-keystore.jks",
"androidKeyStoreAlias": "edge",
"androidKeyStorePassword": "xxxxxxxxx",
"androidTask": "assembleRelease",
"androidTask": "bundleRelease",
"hockeyAppToken": "xxxxx",
"hockeyAppTags": "internal",
"bugsnagApiKey": "xxxxxxxxxx",
"appCenterApiToken": "xxxxxxxxxx",
"appCenterGroupName": "xxxxxxxxxx",
"appCenterDistroGroup": "xxxxxxxxxx",
"appleDeveloperTeamId": "xxxxxxxxxx",
"appleDeveloperTeamName": "edge",
"bundleId": "co.edgesecure.app",
"bundleToolPath": "/Users/jenkins/bin/bundletool-all-1.11.2.jar",
"ios": {
"master": {
"hockeyAppId": "xxxxxxxxx"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"fix-java": "cd android; ./format-java.sh",
"fix-swift": "swift-format format -i ios/*.swift",
"fix": "npm run lint -- --fix && yarn-deduplicate",
"gitVersionFile": "node -r sucrase/register scripts/gitVersionFile.ts",
"ios": "react-native run-ios",
"lint": "eslint .",
"localize": "node -r sucrase/register ./scripts/localizeLanguage.ts; git add ./src/locales/strings",
Expand All @@ -49,7 +50,7 @@
"start": "react-native start",
"test": "jest",
"theme": "node -r sucrase/register ./scripts/themeServer.ts",
"update-version": "node -r sucrase/register scripts/updateVersion.ts",
"updateVersion": "node -r sucrase/register scripts/updateVersion.ts",
"updot": "EDGE_MODE=development updot",
"watch": "npm test -- --watch"
},
Expand Down

0 comments on commit 6e8e00b

Please sign in to comment.