less frequent updates
This commit is contained in:
1 parent
f3d03f4c20
commit
87aea41843
3 files changed
+11
-4
No files matched your search
@@ -237,14 +237,21 @@
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
qtDocs = pkgs.qt6.qtdoc;
|
||||
# Hook: run skyg pkgs update --all before every commit; fail if it bumped
|
||||
# Hook: run skyg pkgs update --all at most once a week; fail if it bumped
|
||||
# anything under pkgs/ so bumps get reviewed and staged, never auto-committed.
|
||||
pkgs-update-script = pkgs.writeShellScriptBin "skyg-pkgs-update" ''
|
||||
set -euo pipefail
|
||||
export PATH=${pkgs.bash}/bin:${pkgs.coreutils}/bin:${pkgs.curl}/bin:${pkgs.jq}/bin:${pkgs.git}/bin:${pkgs.gnused}/bin:${pkgs.gawk}/bin:$PATH
|
||||
root=$(${pkgs.git}/bin/git rev-parse --show-toplevel)
|
||||
cd "$root"
|
||||
stamp=$(${pkgs.git}/bin/git rev-parse --git-path pkgs-update-last-success)
|
||||
now=$(date +%s)
|
||||
last_run=$(date -r "$stamp" +%s 2>/dev/null || echo 0)
|
||||
if (( now - last_run < 604800 )); then
|
||||
exit 0
|
||||
fi
|
||||
${pkgs.nushell}/bin/nu --commands 'use ./bin/lib/cmds.nu *; skyg pkgs update --all'
|
||||
touch "$stamp"
|
||||
if ! ${pkgs.git}/bin/git diff --quiet -- pkgs/; then
|
||||
echo ""
|
||||
echo "pkgs-update: version bumps applied under pkgs/ — review 'git diff pkgs/',"
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ Each package can have an `update.sh` script that automates version bumps.
|
||||
- **`skyg pkgs update --all`** — auto-detect the latest version for all packages that have `update.sh`.
|
||||
- **`skyg pkgs update <pkg-name>`** — auto-detect the latest version for a single package.
|
||||
- **`skyg pkgs update <pkg-name> <version>`** — bump a specific package to a specific version.
|
||||
- **Pre-commit hook** — a `pkgs-update` hook (defined in `flake.nix`) runs `skyg pkgs update --all` before every commit and blocks the commit if it changed anything under `pkgs/` (review + `git add pkgs/`, then commit again).
|
||||
- **Pre-commit hook** — a `pkgs-update` hook (defined in `flake.nix`) runs `skyg pkgs update --all` on the first commit attempt and then at most once every seven days. It records successful runs in Git's local metadata; failed updates are retried on the next commit. If it changed anything under `pkgs/`, it blocks the commit (review + `git add pkgs/`, then commit again without rerunning the update).
|
||||
|
||||
Each `update.sh` supports two modes:
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
let
|
||||
pname = "delta-editor";
|
||||
version = "0.27.1";
|
||||
version = "0.27.2";
|
||||
|
||||
apiUrl = "https://delta.dev/api/releases/nightly/${version}/asset?asset=delta&os=linux&arch=x86_64";
|
||||
|
||||
@@ -38,7 +38,7 @@ let
|
||||
inherit version;
|
||||
|
||||
outputHashMode = "flat";
|
||||
outputHash = "sha256-/kBXce6UVyb9Kxq6CZwOTMc0dNNwXZtBwpYXypuw5AU=";
|
||||
outputHash = "sha256-s8/5ZZvnXUnWLE7ATzlFMS8z3RDpboCr2BywH/Iss9w=";
|
||||
|
||||
nativeBuildInputs = [ curl jq cacert ];
|
||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
Reference in new issue
Block a user