feat(android): Bundle GITHUB_SHA into Android client (#6405)

Closes #6400 


<img width="659" alt="Screenshot 2024-08-21 at 11 24 16 PM"
src="https://github.com/user-attachments/assets/c1240406-4dda-41df-a36e-1ed9e9b0895a">
This commit is contained in:
Jamil
2024-08-26 22:17:22 -07:00
committed by GitHub
parent d042addc5f
commit 2b030d801d
4 changed files with 17 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ jobs:
run: |
echo -n "$FIREBASE_APP_DISTRIBUTION_CREDENTIALS" > $FIREBASE_CREDENTIALS_PATH
./gradlew --info appDistributionUploadRelease uploadCrashlyticsSymbolFileRelease
build_debug:
# Android SDK tools hardware accel is available only on Linux runners
runs-on: ubuntu-22.04

View File

@@ -59,6 +59,9 @@ android {
versionName = "1.2.1"
multiDexEnabled = true
testInstrumentationRunner = "dev.firezone.android.core.HiltTestRunner"
val gitSha = System.getenv("GITHUB_SHA") ?: "unknown"
resValue("string", "git_sha", "Build: \"${gitSha.take(8)}\"")
}
signingConfigs {

View File

@@ -77,5 +77,15 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ilLogFilterInput" />
<TextView
android:id="@+id/tvGitSha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="56dp"
android:text="@string/git_sha"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

View File

@@ -17,6 +17,9 @@ export default function Android() {
established to a gateway, due to routes being updated with no actual
change.
</ChangeItem>
<ChangeItem pull="6405">
Shows the Git SHA corresponding to the build on the Settings -> Advanced screen.
</ChangeItem>
</ul>
</Entry>
*/}