Fix updating lockfile

This commit is contained in:
Roderick van Domburg 2022-05-23 21:42:13 +02:00
parent fb12820f73
commit 15aea747fd
No known key found for this signature in database
GPG key ID: A9EF5222A26F0451

View file

@ -27,14 +27,17 @@ function updateVersion {
do do
if [ "$CRATE" = "librespot" ] if [ "$CRATE" = "librespot" ]
then then
CRATE='' CRATE_DIR=''
else
CRATE_DIR=$CRATE
fi fi
crate_path="$WORKINGDIR/$CRATE/Cargo.toml" crate_path="$WORKINGDIR/$CRATE_DIR/Cargo.toml"
crate_path=${crate_path//\/\///} crate_path=${crate_path//\/\///}
sed -i '' "s/^version.*/version = \"$1\"/g" "$crate_path" sed -i '' "s/^version.*/version = \"$1\"/g" "$crate_path"
echo "Path is $crate_path" echo "Path is $crate_path"
if [ "$CRATE" = "librespot" ] if [ "$CRATE" = "librespot" ]
then then
echo "Updating lockfile"
if [ "$DRY_RUN" = 'true' ] ; then if [ "$DRY_RUN" = 'true' ] ; then
cargo update --dry-run cargo update --dry-run
git add . && git commit --dry-run -a -m "Update Cargo.lock" git add . && git commit --dry-run -a -m "Update Cargo.lock"