haskellPackages: Stackage LTS 18.25 -> Stackage Nightly 2022-02-07
This commit is contained in:
parent
7a18a9a681
commit
b5489b75ee
2 changed files with 785 additions and 694 deletions
|
@ -11,16 +11,16 @@ stackage_config="pkgs/development/haskell-modules/configuration-hackage2nix/stac
|
||||||
trap "rm ${tmpfile} ${tmpfile}.new" 0
|
trap "rm ${tmpfile} ${tmpfile}.new" 0
|
||||||
touch "$tmpfile" "$tmpfile.new" # Creating files here so that trap creates no errors.
|
touch "$tmpfile" "$tmpfile.new" # Creating files here so that trap creates no errors.
|
||||||
|
|
||||||
curl -L -s "https://stackage.org/lts/cabal.config" >"$tmpfile"
|
curl -L -s "https://stackage.org/nightly/cabal.config" >"$tmpfile"
|
||||||
old_version=$(grep "# Stackage" $stackage_config | sed -E 's/.*([0-9]{2}\.[0-9]+)/\1/')
|
old_version=$(grep "# Stackage Nightly" $stackage_config | sed -E 's/.*([0-9]{4}-[0-9]{2}-[0-9]{2}).*/\1/')
|
||||||
version=$(sed -rn "s/^--.*http:..(www.)?stackage.org.snapshot.lts-//p" "$tmpfile")
|
version=$(sed -rn "s/^--.*http:..(www.)?stackage.org.snapshot.nightly-//p" "$tmpfile")
|
||||||
|
|
||||||
if [[ "$old_version" == "$version" ]]; then
|
if [[ "$old_version" == "$version" ]]; then
|
||||||
echo "No new stackage version"
|
echo "No new stackage version"
|
||||||
exit 0 # Nothing to do
|
exit 0 # Nothing to do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Updating Stackage LTS from $old_version to $version."
|
echo "Updating Stackage Nightly from $old_version to $version."
|
||||||
|
|
||||||
# Create a simple yaml version of the file.
|
# Create a simple yaml version of the file.
|
||||||
sed -r \
|
sed -r \
|
||||||
|
@ -33,7 +33,7 @@ sed -r \
|
||||||
< "${tmpfile}" | sort --ignore-case >"${tmpfile}.new"
|
< "${tmpfile}" | sort --ignore-case >"${tmpfile}.new"
|
||||||
|
|
||||||
cat > $stackage_config << EOF
|
cat > $stackage_config << EOF
|
||||||
# Stackage LTS $version
|
# Stackage Nightly $version
|
||||||
# This file is auto-generated by
|
# This file is auto-generated by
|
||||||
# maintainers/scripts/haskell/update-stackage.sh
|
# maintainers/scripts/haskell/update-stackage.sh
|
||||||
default-package-overrides:
|
default-package-overrides:
|
||||||
|
@ -50,7 +50,7 @@ sed -r \
|
||||||
if [[ "${1:-}" == "--do-commit" ]]; then
|
if [[ "${1:-}" == "--do-commit" ]]; then
|
||||||
git add $stackage_config
|
git add $stackage_config
|
||||||
git commit -F - << EOF
|
git commit -F - << EOF
|
||||||
haskellPackages: stackage-lts $old_version -> $version
|
haskellPackages: stackage-nightly $old_version -> $version
|
||||||
|
|
||||||
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
|
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
|
||||||
EOF
|
EOF
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue