mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 04:50:21 +00:00
sharedown: update updateScript
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts curl jq yarn yarn2nix-moretea.yarn2nix
|
||||
#!nix-shell -i bash -p common-updater-scripts curl jq yarn yarn2nix-moretea.yarn2nix nodejs
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
owner=kylon
|
||||
repo=Sharedown
|
||||
latestVersion=$(curl "https://api.github.com/repos/$owner/$repo/releases/latest" | jq -r '.tag_name')
|
||||
latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL "https://api.github.com/repos/kylon/Sharedown/releases/latest" | jq -r '.tag_name')
|
||||
currentVersion=$(nix-instantiate --eval --expr 'with import ./. {}; sharedown.version' | tr -d '"')
|
||||
|
||||
if [[ "$currentVersion" == "$latestVersion" && "${BUMP_LOCK-}" != "1" ]]; then
|
||||
@@ -22,5 +20,5 @@ tempDir="$(mktemp -d)"
|
||||
cp -r "$sourceDir"/* "$tempDir"
|
||||
cd "$tempDir"
|
||||
PUPPETEER_SKIP_DOWNLOAD=1 yarn install
|
||||
yarn2nix > "$dirname/yarndeps.nix"
|
||||
yarn2nix >"$dirname/yarndeps.nix"
|
||||
cp -r yarn.lock "$dirname"
|
||||
|
||||
Reference in New Issue
Block a user