Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p yq nix bash coreutils nix-update common-updater-scripts ripgrep flutter
|
|
|
|
set -eou pipefail
|
|
|
|
PACKAGE_DIR="$(realpath "$(dirname "$0")")"
|
|
cd "$PACKAGE_DIR"/..
|
|
while ! test -f flake.nix; do cd ..; done
|
|
NIXPKGS_DIR="$PWD"
|
|
|
|
latestVersion=$(
|
|
list-git-tags --url=https://github.com/xiaoyaocz/dart_simple_live |
|
|
rg '^v(.*)' -r '$1' |
|
|
sort --version-sort |
|
|
tail -n1
|
|
)
|
|
|
|
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; simple-live-app.version or (lib.getVersion simple-live-app)" | tr -d '"')
|
|
|
|
if [[ "$currentVersion" == "$latestVersion" ]]; then
|
|
echo "package is up-to-date: $currentVersion"
|
|
exit 0
|
|
fi
|
|
|
|
nix-update --version=$latestVersion simple-live-app
|
|
|
|
export HOME="$(mktemp -d)"
|
|
src="$(nix-build --no-link "$NIXPKGS_DIR" -A simple-live-app.src)"
|
|
TMPDIR="$(mktemp -d)"
|
|
cp --recursive --no-preserve=mode "$src"/* $TMPDIR
|
|
cd "$TMPDIR"/simple_live_app
|
|
flutter pub get
|
|
yq . pubspec.lock >"$PACKAGE_DIR"/pubspec.lock.json
|
|
rm -rf $TMPDIR
|