My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/applications/audio/netease-cloud-music-gtk/update-cargo-lock.sh

20 lines
555 B

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils ripgrep git cargo
# Ref: https://github.com/NixOS/nixpkgs/blob/nixos-21.05/pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh
set -eu -vx
here=$PWD
version=$(cat default.nix | rg '^ version = "' | cut -d '"' -f 2)
checkout=$(mktemp -d)
git clone -b "$version" --depth=1 https://github.com/gmg137/netease-cloud-music-gtk "$checkout"
cd "$checkout"
cargo generate-lockfile
git add -f Cargo.lock
git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch
cd "$here"
rm -rf "$checkout"