cardano-haskell-packages
cardano-haskell-packages copied to clipboard
Improve scripts/add-revions.sh
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.
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
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.
Changes to use-gnu-tar.sh as well as current-timestamp.sh from this one still seem relevant.