refactor: remove firmware assets from release

pull/784/head
andrekir 2023-11-28 19:59:27 -03:00
rodzic 5946399fd8
commit c4db056b1f
9 zmienionych plików z 13 dodań i 79 usunięć

Wyświetl plik

@ -26,10 +26,6 @@ jobs:
run: |
rm ./app/google-services.json
cp ./app/google-services-example.json ./app/google-services.json
rm ./app/src/main/res/values/curfirmwareversion.xml
cp ./app/special/curfirmwareversion.xml ./app/src/main/res/values/
rm -rf ./app/src/main/assets/firmware
mkdir -p ./app/src/main/assets/firmware
- name: Set up JDK 17
uses: actions/setup-java@v3

Wyświetl plik

@ -39,45 +39,6 @@ jobs:
distribution: 'zulu'
# Note: we don't use caches on release builds because we don't want to accidentally not have a virgin build machine
- name: Find firmware release tag
id: firmware_version
uses: oprypin/find-latest-tag@v1
with:
repository: meshtastic/Meshtastic-device
releases-only: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create version strings
run: |
echo "CUR_FIRMWARE_VERSION=$(echo ${{ steps.firmware_version.outputs.tag }}|sed -e 's/^v//')" >> $GITHUB_ENV
echo "SHORT_FIRMWARE_VERSION=$(echo ${{ steps.firmware_version.outputs.tag }}|sed -e 's/^v//' -e 's/.\{8\}$//')" >> $GITHUB_ENV
- name: Create curfirmwareversion.xml
run: |
rm ./app/src/main/res/values/curfirmwareversion.xml
echo -e "<resources>\n <string name=\"cur_firmware_version\" translatable=\"false\">${{ env.CUR_FIRMWARE_VERSION }}</string>\n <string name=\"short_firmware_version\" translatable=\"false\">${{ env.SHORT_FIRMWARE_VERSION }}</string>\n</resources>" > ./app/src/main/res/values/curfirmwareversion.xml
# - name: Fetch firmware release
# uses: dsaltares/fetch-gh-release-asset@master
# with:
# repo: meshtastic/Meshtastic-device
# file: firmware-${{ env.CUR_FIRMWARE_VERSION }}.zip
# version: tags/${{ steps.firmware_version.outputs.tag }}
# target: firmware.zip
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Unzip firmware into assets/firmware
# run: |
# rm -rf ./app/src/main/assets/firmware
# mkdir -p ./app/src/main/assets/firmware
# unzip -qq ./firmware.zip 'littlefs-*.bin' 'firmware-heltec*.bin' 'firmware-tbeam*.bin' 'firmware-tlora*.bin' 'firmware-nano*.bin' -d ./app/src/main/assets/firmware
# rm ./firmware.zip
- name: Mock firmware assets for release
run: |
rm -rf ./app/src/main/assets/firmware
mkdir -p ./app/src/main/assets/firmware
- name: Build F-Droid release
run: ./gradlew assembleFdroidRelease
@ -87,17 +48,6 @@ jobs:
- name: Build Play Store release
run: ./gradlew bundleGoogleRelease assembleGoogleRelease
# - name: Upload Release to Play Store
# run: cp ./app/src/main/play/release-notes/en-US/production.txt ./app/src/main/play/release-notes/whatsnew-en-US.txt
# - uses: r0adkll/upload-google-play@v1
# with:
# serviceAccountJsonPlainText: ${{ secrets.GSERVICES }}
# packageName: com.geeksville.mesh
# releaseFiles: app/build/outputs/bundle/release/app-release.aab
# track: internal
# whatsNewDirectory: app/src/main/play/release-notes
# mappingFile: app/build/outputs/mapping/release/mapping.txt
- name: Create GitHub release
uses: actions/create-release@v1
id: create_release
@ -140,6 +90,3 @@ jobs:
asset_path: app/build/outputs/apk/google/release/app-google-release.apk
asset_name: googleRelease-${{ env.versionName }}.apk
asset_content_type: application/zip
# - name: Gradle publishBundle
# run: ./gradlew publishBundle

Wyświetl plik

@ -50,8 +50,7 @@ android {
}
google {
dimension = 'default'
if (project.findProperty("useCrashlytics") == true) {
println("useCrashlytics plugins $useCrashlytics")
if (useCrashlytics) {
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
}

Wyświetl plik

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is used by the android app for software updates.
It reflects the firmware version included in: ./app/src/main/assets/firmware/
Matches output from Meshtastic-device/bin/buildinfo.py 'long' & 'short' -->
<resources>
<string name="cur_firmware_version" translatable="false">0.2.0.abcdefg</string>
<string name="short_firmware_version" translatable="false">0.2.0</string>
</resources>

Wyświetl plik

@ -1 +0,0 @@
../../../../../meshtastic-esp32/release/latest/forandroid

Wyświetl plik

@ -1,6 +1,5 @@
package com.geeksville.mesh.repository.radio
import android.app.Application
import com.geeksville.mesh.*
import com.geeksville.mesh.android.Logging
import com.geeksville.mesh.concurrent.handledLaunch
@ -23,7 +22,6 @@ private val defaultChannel = channel {
/** A simulated interface that is used for testing in the simulator */
class MockInterface @AssistedInject constructor(
private val context: Application,
private val service: RadioInterfaceService,
@Assisted val address: String,
) : IRadioInterface, Logging {
@ -189,7 +187,7 @@ class MockInterface @AssistedInject constructor(
MeshProtos.FromRadio.newBuilder().apply {
metadata = deviceMetadata {
firmwareVersion = context.getString(R.string.cur_firmware_version)
firmwareVersion = "${BuildConfig.VERSION_NAME}.abcdefg"
}
},

Wyświetl plik

@ -1 +0,0 @@
../../../../../../meshtastic-esp32/release/latest/curfirmwareversion.xml

Wyświetl plik

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is used by the android app for software updates.
It reflects the firmware version included in: ./app/src/main/assets/firmware/
Matches output from Meshtastic-device/bin/buildinfo.py 'long' & 'short' -->
<resources>
<string name="cur_firmware_version" translatable="false">0.2.0.abcdefg</string>
<string name="short_firmware_version" translatable="false">0.2.0</string>
</resources>

Wyświetl plik

@ -1,3 +0,0 @@
<resources>
<string name="min_firmware_version" translatable="false">0.1.01</string>
</resources>

Wyświetl plik

@ -21,8 +21,7 @@ buildscript {
// in the individual module build.gradle files
// Firebase Crashlytics
if (project.findProperty("useCrashlytics") == true) {
println("useCrashlytics classpath $useCrashlytics")
if (useCrashlytics) {
classpath 'com.google.gms:google-services:4.4.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
}