Compare commits
No commits in common. "master" and "0.9.10" have entirely different histories.
|
|
@ -1,5 +0,0 @@
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@color/ic_launcher_background" />
|
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
|
||||||
<monochrome android:drawable="@mipmap/ic_launcher_monochrome" />
|
|
||||||
</adaptive-icon>
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@color/ic_launcher_background" />
|
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
|
||||||
<monochrome android:drawable="@mipmap/ic_launcher_monochrome" />
|
|
||||||
</adaptive-icon>
|
|
||||||
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="ic_launcher_background">#FFFFFF</color>
|
|
||||||
</resources>
|
|
||||||
BIN
assets/alarm.wav
|
|
@ -59,7 +59,6 @@ class _EggTimerScreenState extends State<EggTimerScreen> {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_audioPlayer = AudioPlayer();
|
_audioPlayer = AudioPlayer();
|
||||||
_configureAudioContext();
|
|
||||||
_initLocationAndAltitude();
|
_initLocationAndAltitude();
|
||||||
_loadAppVersion();
|
_loadAppVersion();
|
||||||
}
|
}
|
||||||
|
|
@ -181,24 +180,6 @@ class _EggTimerScreenState extends State<EggTimerScreen> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _configureAudioContext() async {
|
|
||||||
await AudioPlayer.global.setAudioContext(
|
|
||||||
AudioContext(
|
|
||||||
android: const AudioContextAndroid(
|
|
||||||
isSpeakerphoneOn: true,
|
|
||||||
stayAwake: false,
|
|
||||||
contentType: AndroidContentType.sonification,
|
|
||||||
usageType: AndroidUsageType.alarm,
|
|
||||||
audioFocus: AndroidAudioFocus.gainTransient,
|
|
||||||
),
|
|
||||||
iOS: AudioContextIOS(
|
|
||||||
category: AVAudioSessionCategory.playback,
|
|
||||||
options: {AVAudioSessionOptions.defaultToSpeaker},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
String _formatDuration(Duration d) {
|
String _formatDuration(Duration d) {
|
||||||
final m = d.inMinutes.remainder(60).toString().padLeft(2, '0');
|
final m = d.inMinutes.remainder(60).toString().padLeft(2, '0');
|
||||||
final s = d.inSeconds.remainder(60).toString().padLeft(2, '0');
|
final s = d.inSeconds.remainder(60).toString().padLeft(2, '0');
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 0.9.15
|
version: 0.9.10
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.10.1
|
sdk: ^3.10.1
|
||||||
|
|
|
||||||
50
release.sh
|
|
@ -1,5 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
flutter clean
|
||||||
|
flutter pub get
|
||||||
|
flutter build apk --release
|
||||||
|
cp build/app/outputs/flutter-apk/app-release.apk ./release/eggtimer.apk
|
||||||
|
echo "APK built and copied to ./release/eggtimer.apk"
|
||||||
|
GITEA_URL="https://git.ude-consult.de"
|
||||||
|
GITEA_TOKEN="6ea286299e8e081d9923d5deea2fbd91ad83dc8e"
|
||||||
|
OWNER="Arnold"
|
||||||
|
REPO="EggTimer"
|
||||||
|
APK_PATH="release/eggtimer.apk"
|
||||||
|
|
||||||
PUBSPEC="pubspec.yaml"
|
PUBSPEC="pubspec.yaml"
|
||||||
|
|
||||||
|
|
@ -19,18 +29,6 @@ echo "Neue Version: $new"
|
||||||
|
|
||||||
sed -i "s/^version: .*/version: ${new}/" "$PUBSPEC"
|
sed -i "s/^version: .*/version: ${new}/" "$PUBSPEC"
|
||||||
|
|
||||||
flutter clean
|
|
||||||
flutter pub get
|
|
||||||
flutter build apk --release
|
|
||||||
mkdir -p release
|
|
||||||
cp build/app/outputs/flutter-apk/app-release.apk ./release/eggtimer.apk
|
|
||||||
echo "APK built and copied to ./release/eggtimer.apk"
|
|
||||||
GITEA_URL="https://git.ude-consult.de"
|
|
||||||
GITEA_TOKEN="6ea286299e8e081d9923d5deea2fbd91ad83dc8e"
|
|
||||||
OWNER="Arnold"
|
|
||||||
REPO="EggTimer"
|
|
||||||
APK_PATH="release/eggtimer.apk"
|
|
||||||
|
|
||||||
# Version z.B. aus Datei oder Argument
|
# Version z.B. aus Datei oder Argument
|
||||||
VERSION_TAG=$(grep "^version:" pubspec.yaml | awk '{print $2}')
|
VERSION_TAG=$(grep "^version:" pubspec.yaml | awk '{print $2}')
|
||||||
git commit -a -m"Version auf ${VERSION_TAG} gesetzt"
|
git commit -a -m"Version auf ${VERSION_TAG} gesetzt"
|
||||||
|
|
@ -63,38 +61,12 @@ fi
|
||||||
|
|
||||||
echo "Release ${VERSION_TAG} erstellt, ID=${release_id}"
|
echo "Release ${VERSION_TAG} erstellt, ID=${release_id}"
|
||||||
|
|
||||||
APK_FILENAME="eggtimer-${VERSION_TAG}.apk"
|
|
||||||
|
|
||||||
# Alte Assets entfernen, damit nur die APK im Release bleibt
|
|
||||||
existing_assets=$(curl -sS \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
"${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}/releases/${release_id}/assets")
|
|
||||||
|
|
||||||
echo "$existing_assets" | jq -r '.[] | [.id, .name] | @tsv' | while IFS=$'\t' read -r asset_id asset_name; do
|
|
||||||
echo "Entferne altes Asset: ${asset_name}"
|
|
||||||
curl -sS -X DELETE \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
"${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}/releases/${release_id}/assets/${asset_id}" >/dev/null
|
|
||||||
done
|
|
||||||
|
|
||||||
# 2. APK hochladen
|
# 2. APK hochladen
|
||||||
curl -sS -X POST \
|
curl -sS -X POST \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
-F "attachment=@${APK_PATH};filename=${APK_FILENAME}" \
|
-F "attachment=@${APK_PATH};filename=eggtimer-${VERSION_TAG}.apk" \
|
||||||
"${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}/releases/${release_id}/assets"
|
"${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}/releases/${release_id}/assets"
|
||||||
|
|
||||||
echo "APK hochgeladen."
|
echo "APK hochgeladen."
|
||||||
|
|
||||||
# Nur die drei neuesten Releases behalten, ältere löschen
|
|
||||||
all_releases=$(curl -sS \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
"${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}/releases")
|
|
||||||
|
|
||||||
echo "$all_releases" | jq -r 'sort_by(.created_at) | .[0:-3] | .[]? | "\(.id)\t\(.tag_name)"' | while IFS=$'\t' read -r old_id old_tag; do
|
|
||||||
echo "Lösche altes Release: ${old_tag} (ID ${old_id})"
|
|
||||||
curl -sS -X DELETE \
|
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
"${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}/releases/${old_id}" >/dev/null
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Ältere Releases bereinigt; es bleiben die letzten drei."
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
# Test the release before publishing
|
|
||||||
flutter emulator --launch Pixel_7
|
|
||||||
sleep 5s
|
|
||||||
flutter run
|
|
||||||
|
|
||||||