1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p common-updater-scripts curl jq yarn yarn2nix-moretea.yarn2nix
8 latestVersion
=$
(curl
"https://api.github.com/repos/$owner/$repo/releases/latest" | jq
-r '.tag_name')
9 currentVersion
=$
(nix-instantiate
--eval --expr 'with import ./. {}; sharedown.version' |
tr -d '"')
11 if [[ "$currentVersion" == "$latestVersion" && "${BUMP_LOCK-}" != "1" ]]; then
12 # Skip update when already on the latest version.
16 update-source-version sharedown
"$latestVersion"
18 dirname="$(realpath "$
(dirname "$0")")"
19 sourceDir
="$(nix-build -A sharedown.src --no-out-link)"
20 tempDir
="$(mktemp -d)"
22 cp -r "$sourceDir"/* "$tempDir"
24 PUPPETEER_SKIP_DOWNLOAD
=1 yarn
install
25 yarn2nix
> "$dirname/yarndeps.nix"
26 cp -r yarn.lock
"$dirname"