Skip to content

Commit

Permalink
Tp remove bte naming build fix (#1027)
Browse files Browse the repository at this point in the history
* Replace BTE with BT within application

WHY:
Initially, BTE was used even though it didn't stand for anything. I think this came from
BLE, but got lost in translation. Now the PathCheck apps are GPS and BT, so removing
use of BTE within the app will hopefully unify the language and remove the use of BTE
in conversations.

* Update package names to fix build.

Co-authored-by: Thomas Paresi <[email protected]>
Co-authored-by: Dick Lucas <[email protected]>
  • Loading branch information
3 people authored Jun 16, 2020
1 parent 304b888 commit a8ff041
Show file tree
Hide file tree
Showing 115 changed files with 262 additions and 262 deletions.
4 changes: 2 additions & 2 deletions .env.bte → .env.bt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is the BTE debug/dev .env file. Any debug or non-release-signed build will
# This is the BT debug/dev .env file. Any debug or non-release-signed build will
# use these flags.

# About flags:
Expand All @@ -7,4 +7,4 @@
# For now, only true/1 is parsed, everything else will be interpretted as false
# flags must begin with flag_ and are case sensitive

TRACING_STRATEGY=bte
TRACING_STRATEGY=bt
4 changes: 2 additions & 2 deletions .env.bte.release → .env.bt.release
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# only prod ready feature flags should be enabled here.
#
# For Android, this file is automatically used for any release build. iOS should
# prepend ENVFILE=.env.bte.release before any build commands.
# prepend ENVFILE=.env.bt.release before any build commands.

TRACING_STRATEGY=bte
TRACING_STRATEGY=bt
6 changes: 3 additions & 3 deletions .env.bte.staging → .env.bt.staging
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Flags that are ready for testing/staging should be enabled here.

# When making any Staging channel build on both iOS or Android, prepend the build
# command with ENVFILE=.env.bte.staging
# command with ENVFILE=.env.bt.staging
#
# e.g.
#
# ENVFILE=.env.bte.staging ./gradlew assembleRelease
# ENVFILE=.env.bt.staging ./gradlew assembleRelease

TRACING_STRATEGY=bte
TRACING_STRATEGY=bt
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
name: app-gps-staging
path: android/app/build/outputs/apk/gps/staging/app-gps-staging.apk

build_staging_android_bte:
build_staging_android_bt:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down Expand Up @@ -137,15 +137,15 @@ jobs:
- name: Build android Staging artifact
uses: maierj/[email protected]
with:
lane: 'staging_bte'
lane: 'staging_bt'
subdirectory: 'android'
bundle-install-path: 'vendor/bundle'

- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: app-bte-staging
path: android/app/build/outputs/apk/bte/staging/app-bte-staging.apk
name: app-bt-staging
path: android/app/build/outputs/apk/bt/staging/app-bt-staging.apk

build_staging_ios_gps:
# Deliberately turned off the pull request logic here
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
name: COVIDSafePaths-staging-gps
path: ios/COVIDSafePaths-staging.ipa

build_staging_ios_bte:
build_staging_ios_bt:
# Deliberately turned off the pull request logic here
# because GitHub Actions explicitly turns off secrets for pull requests coming from a forked repo
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')
Expand Down Expand Up @@ -279,20 +279,20 @@ jobs:
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.MATCH_SSH_CERT }}"
- name: Build BTE iOS Production artifact for devices
- name: Build BT iOS Production artifact for devices
uses: maierj/[email protected]
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_GIT_BASIC_AUTH: ${{ secrets.MATCH_GIT_BASIC_AUTH }}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
with:
lane: 'staging_bte'
lane: 'staging_bt'
subdirectory: 'ios'
bundle-install-path: 'vendor/bundle'

- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: COVIDSafePaths-staging-bte
path: ios/COVIDSafePaths-bte-staging.ipa
name: COVIDSafePaths-staging-bt
path: ios/COVIDSafePaths-bt-staging.ipa
20 changes: 10 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- gps-release
- bte-release
- bt-release
paths-ignore:
- 'package.json'
- 'CHANGELOG.md'
Expand Down Expand Up @@ -205,9 +205,9 @@ jobs:
subdirectory: 'ios'
bundle-install-path: 'vendor/bundle'

deploy_ios_bte:
# bte-release branch only
if: github.event_name == 'push' && github.ref == 'refs/heads/bte-release'
deploy_ios_bt:
# bt-release branch only
if: github.event_name == 'push' && github.ref == 'refs/heads/bt-release'
runs-on: macOS-latest
needs: version_bump
steps:
Expand Down Expand Up @@ -273,7 +273,7 @@ jobs:
MATCH_GIT_BASIC_AUTH: ${{ secrets.MATCH_GIT_BASIC_AUTH }}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
with:
lane: 'release_bte'
lane: 'release_bt'
subdirectory: 'ios'
bundle-install-path: 'vendor/bundle'

Expand All @@ -292,9 +292,9 @@ jobs:
subdirectory: 'ios'
bundle-install-path: 'vendor/bundle'

deploy_android_bte:
# bte-release branch only
if: github.event_name == 'push' && github.ref == 'refs/heads/bte-release'
deploy_android_bt:
# bt-release branch only
if: github.event_name == 'push' && github.ref == 'refs/heads/bt-release'
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down Expand Up @@ -370,13 +370,13 @@ jobs:
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
GITHUB_RUN_NUMBER: ${{ github.run_number }}
with:
lane: 'release_bte'
lane: 'release_bt'
subdirectory: 'android'
bundle-install-path: 'vendor/bundle'

- name: Upload to Google Play beta track
uses: maierj/[email protected]
with:
lane: 'play_store_bte'
lane: 'play_store_bt'
subdirectory: 'android'
bundle-install-path: 'vendor/bundle'
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
branches:
- develop
- master
- bte-release
- bt-release
- gps-release
pull_request:
branches:
- develop
- master
- bte-release
- bt-release
- gps-release

jobs:
Expand Down Expand Up @@ -59,11 +59,11 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: ./gradlew :app:connectedGpsDebugAndroidTest :app:connectedBteDebugAndroidTest --no-daemon
- name: ./gradlew :app:connectedGpsDebugAndroidTest :app:connectedBtDebugAndroidTest --no-daemon
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 28
script: ./gradlew :app:connectedGpsDebugAndroidTest :app:connectedBteDebugAndroidTest --no-daemon
script: ./gradlew :app:connectedGpsDebugAndroidTest :app:connectedBtDebugAndroidTest --no-daemon
working-directory: ./android

unit-test-ios:
Expand Down
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ ios/COVIDSafePaths-staging.ipa
ios/COVIDSafePaths-staging.app
ios/COVIDSafePaths-staging.app.dSYM.zip

ios/COVIDSafePaths-bte.ipa
ios/COVIDSafePaths-bte.app
ios/COVIDSafePaths-bte.app.dSYM.zip
ios/COVIDSafePaths-bt.ipa
ios/COVIDSafePaths-bt.app
ios/COVIDSafePaths-bt.app.dSYM.zip

ios/COVIDSafePaths-staging-bte.ipa
ios/COVIDSafePaths-staging-bte.app
ios/COVIDSafePaths-stating-bte.app.dSYM.zip
ios/COVIDSafePaths-staging-bt.ipa
ios/COVIDSafePaths-staging-bt.app
ios/COVIDSafePaths-stating-bt.app.dSYM.zip

# Local Android build artifacts
android/app/src/main/assets/index.android.bundle
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ dev_setup.bat
```
yarn run-android-gps ## for the location enabled app
yarn run-android-bte ## for the bluetooth enabled app
yarn run-android-bt ## for the bluetooth enabled app
```

Device storage can be cleared by long-pressing on the app icon in the simulator, clicking "App info", then "Storage", and lastly, "Clear Storage".
Expand All @@ -142,7 +142,7 @@ Then, run the application:
```
yarn run-ios-gps ## for the location enabled app
yarn run-ios-bte ## for the bluetooth enabled app
yarn run-ios-bt ## for the bluetooth enabled app
```

Device storage can be cleared by clicking "Hardware" on the system toolbar, and then "Erase all content and settings".
Expand Down
16 changes: 8 additions & 8 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'realm-android'

project.ext.envConfigFiles = [
btedebug: ".env.bte",
btestaging: ".env.bte.staging",
bterelease: ".env.bte.release",
btdebug: ".env.bt",
btstaging: ".env.bt.staging",
btrelease: ".env.bt.release",

gpsdebug: ".env.gps",
gpsstaging: ".env.gps.staging",
Expand Down Expand Up @@ -94,11 +94,11 @@ import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js",
bundleInGpsDebug: false,
bundleInBteDebug: false,
bundleInBtDebug: false,
bundleInGpsStaging: true,
bundleInBteStaging: true,
bundleInBtStaging: true,
devDisabledInGpsStaging: true,
devDisabledInBteStaging: true,
devDisabledInBtStaging: true,
enableHermes: false, // clean and rebuild if changing
]

Expand Down Expand Up @@ -212,8 +212,8 @@ android {
applicationId 'org.pathcheck.covidsafepaths'
dimension "version"
}
bte {
applicationId 'org.pathcheck.covidsafepathsBte'
bt {
applicationId 'org.pathcheck.covidsafepathsBt'
dimension "version"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

<application android:name="covidsafepaths.bte.MainApplication"/>
<application android:name="covidsafepaths.bt.MainApplication"/>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package covidsafepaths.bte;
package covidsafepaths.bt;

import android.app.Application;
import android.content.Context;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ platform :android do
end

desc "Build a Staging AAB"
lane :staging_bte do
lane :staging_bt do
gradle(
task: "clean assembleBteStaging",
task: "clean assembleBtStaging",
print_command: false,
)
end

desc "Build a Release AAB"
lane :release_bte do
lane :release_bt do

build_number = ENV["GITHUB_RUN_NUMBER"]

Expand All @@ -87,7 +87,7 @@ platform :android do

gradle(
task: "bundle",
build_type: "bteRelease",
build_type: "btRelease",
print_command: false,
properties: {
"android.injected.signing.store.password" => ENV["KEY_STORE_PASSWORD"],
Expand All @@ -99,7 +99,7 @@ platform :android do
end

desc "Upload to google play store beta track"
lane :play_store_bte do
lane :play_store_bt do

validate_play_store_json_key(
json_key: "app/json_key.json",
Expand All @@ -109,8 +109,8 @@ platform :android do
track: 'beta',
release_status: 'draft',
skip_upload_apk: true,
package_name: 'org.pathcheck.covidsafepathsBte',
aab: "app/build/outputs/bundle/bteRelease/app.aab"
package_name: 'org.pathcheck.covidsafepathsBt',
aab: "app/build/outputs/bundle/btRelease/app.aab"
)

end
Expand Down
12 changes: 6 additions & 6 deletions android/fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ Build a Release APK and AAB
fastlane android play_store
```
Upload to google play store beta track
### android staging_bte
### android staging_bt
```
fastlane android staging_bte
fastlane android staging_bt
```
Build a Staging APK and AAB
### android release_bte
### android release_bt
```
fastlane android release_bte
fastlane android release_bt
```
Build a Release APK and AAB
### android play_store_bte
### android play_store_bt
```
fastlane android play_store_bte
fastlane android play_store_bt
```
Upload to google play store beta track

Expand Down
4 changes: 2 additions & 2 deletions app/locales/pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ lokalise2 file download \
--export-sort=a_z \
--config .lokalise.yml --token=$LOKALISE_TOKEN

echo "Downloading Android BTE strings.xml"
echo "Downloading Android BT strings.xml"
lokalise2 file download \
--add-newline-eof \
--export-empty-as skip \
--format xml \
--include-description \
--original-filenames \
--unzip-to=android/app/src/bte/res \
--unzip-to=android/app/src/bt/res \
--export-sort=a_z \
--config .lokalise.yml --token=$LOKALISE_TOKEN

Expand Down
2 changes: 1 addition & 1 deletion app/locales/push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi

echo "Uploading English base files"
lokalise2 file upload \
--file=app/locales/en.json,ios/en.lproj/InfoPlist.strings,ios/en.lproj/Localizable.strings,android/app/src/gps/res/values/strings.xml,android/app/src/bte/res/values/strings.xml \
--file=app/locales/en.json,ios/en.lproj/InfoPlist.strings,ios/en.lproj/Localizable.strings,android/app/src/gps/res/values/strings.xml,android/app/src/bt/res/values/strings.xml \
--lang-iso=en \
--cleanup-mode \
--replace-modified \
Expand Down
4 changes: 2 additions & 2 deletions ios/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// AppDelegate.m
// BTE
// BT
//
// Created by John Schoeman on 5/28/20.
// Copyright © 2020 Path Check Inc. All rights reserved.
Expand All @@ -15,7 +15,7 @@
#import <RNCPushNotificationIOS.h>
#import <UserNotifications/UserNotifications.h>
#import <RNSplashScreen.h>
#import <BTE-Swift.h>
#import <BT-Swift.h>

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit a8ff041

Please sign in to comment.