feat(wearos): add release signing via EAS credentials.json
This commit is contained in:
@@ -30,6 +30,21 @@ cd "$WEAR_DIR"
|
||||
echo "Building WearOS ($PROFILE) v$VERSION ($VERSION_CODE)..."
|
||||
|
||||
if [ "$PROFILE" = "release" ]; then
|
||||
if [ ! -f "$WEAR_DIR/../credentials.json" ]; then
|
||||
echo "credentials.json not found. Downloading from EAS..."
|
||||
cd "$PROJECT_ROOT"
|
||||
eas credentials --platform android --non-interactive 2>/dev/null || {
|
||||
echo "Auto-download failed. Run manually:"
|
||||
echo " eas credentials --platform android"
|
||||
echo " → Choose 'credentials.json: Upload/Download credentials'"
|
||||
echo " → Choose 'Download credentials from EAS to credentials.json'"
|
||||
echo " Then: cp credentials.json targets/wearos/credentials.json"
|
||||
exit 1
|
||||
}
|
||||
cp credentials.json "$WEAR_DIR/credentials.json"
|
||||
echo "credentials.json copied to targets/wearos/"
|
||||
cd "$WEAR_DIR"
|
||||
fi
|
||||
./gradlew assembleRelease -PversionName="$VERSION" -PversionCode="$VERSION_CODE"
|
||||
APK_PATH="app/build/outputs/apk/release/app-release.apk"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user