depot/third_party/nixpkgs/pkgs/servers/gotify/update-yarn-deps.sh
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

20 lines
633 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../ -i bash -p wget yarn2nix-moretea.yarn2nix
# This script is based upon:
# pkgs/applications/networking/instant-messengers/riot/update-riot-desktop.sh
set -euo pipefail
if [ "$#" -ne 1 ] || [[ "$1" == -* ]]; then
echo "Regenerates the Yarn dependency lock files for the gotify-server package."
echo "Usage: $0 <git release tag>"
exit 1
fi
GOTIFY_WEB_SRC="https://raw.githubusercontent.com/gotify/server/$1"
wget "$GOTIFY_WEB_SRC/ui/package.json" -O package.json
wget "$GOTIFY_WEB_SRC/ui/yarn.lock" -O yarn.lock
yarn2nix --lockfile=yarn.lock > yarndeps.nix
rm yarn.lock