diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 548bee8f43d..c94b22d84fd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -279,8 +279,11 @@ for `cardano-node` on 32 architecture are too high). New versions of packages are published on [CHaP]. To release packages to [CHaP] one should use `./scritp/release-to-chap.sh`. -* First run `./script/release-to-chap.sh -r` to see which changes will be - published. And verify that all `CHANGELOG.md` files are up-to-date. +* First run `./script/release-to-chap.sh -r` to see which changes can be + published. +* Update versions in `*.cabal` files according to changes in `CHANGELOG.md` + files. +* Update `CHANGELOG.md` files. * Run `./script/release-to-chap.sh` which will create a PR in `cardano-haskell-packages` repo (pointed by `CARDANO_HASKELL_PACKAGES_DIR` environment variable or `/tmp/chap` if it's not defined). diff --git a/scripts/build-with-chap.sh b/scripts/build-with-chap.sh index 02a55320a7a..7dac3bf2160 100755 --- a/scripts/build-with-chap.sh +++ b/scripts/build-with-chap.sh @@ -19,13 +19,13 @@ fi cabal_files=$(fd -ae 'cabal') for cf in $cabal_files; do name=$(cat $cf | grep '^name:' | awk '{ print $2 }') - version=$(ls -1 $CHAP_DIR/_sources/$name | sort | tail -1) + version=$(ls -1 $CHAP_DIR/_sources/$name | sort -V | tail -1) tag="$name-$version" echo "$tag ($(git rev-parse $tag))" git restore --source="$name-$version" -- $name revdir="$CHAP_DIR/_sources/$name/$version/revisions" if [[ -d $revdir ]]; then - rev=$(ls $revdir | sort | tail -1) + rev=$(ls $revdir | sort -V | tail -1) echo "copy revision $revdir/$rev to $name/$name.cabal" cp $revdir/$rev "$name/$name.cabal" fi