cardano-haskell-packages icon indicating copy to clipboard operation
cardano-haskell-packages copied to clipboard

Improve scripts/add-revions.sh

Open hamishmack opened this issue 2 years ago • 3 comments
trafficstars

The need to pass a BUILT_REPO arg is very confusing and it is small enough to just DL the latest to a temp dir.

This change also only uses the BUILT_REPO if there is no existing revision. If there is a revision it copies the .cabal file from there (in case it is not in the BUILT_REPO yet).

Also uses date -u instead of date --utc so that we don't have to install gdate on macOS to make it work.

hamishmack avatar Jun 07 '23 01:06 hamishmack

If we need to pass in a different _repo we could make something like this work:

BUILT_REPO=_repo .scripts/add-revions.sh foo 1.0.0

hamishmack avatar Jun 07 '23 03:06 hamishmack

This won't work now if you need to add a revision to something that's not in the remote, or if you're doing multiple revisions to something. That's uncommon, but kind of important when you need it. We could wrap this in something that fetches the repository, it would be nice to keep the bare one also.

michaelpj avatar Jun 07 '23 09:06 michaelpj

Changes to use-gnu-tar.sh as well as current-timestamp.sh from this one still seem relevant.

aniketd avatar Mar 18 '25 17:03 aniketd