Add “Ignore warning” option to cabal check
[cabal.git] / scripts / release / create-release-metadata-for-ghcup.sh
blobc8683c2b85ca4f59ac0f6d349e47a074f677d13e
1 #!/usr/bin/env bash
3 # This script, when passed the cabal release number as the first and only argument
4 # generates the metadata in the correct format to be useable as is by GHCup
5 # for eg:-
6 # $ create-release-metadata-for-ghcup.sh 3.10.2.0 or "3.10.2.0"
8 # Note:- Please run ./download-cabal-install-release-binaries.sh before running this script.
9 set -eu
10 set -o pipefail
12 RELEASE=$1
13 ## FixMe:// What dir to use here?
15 if [ -d "binary-downloads/cabal-install-${RELEASE}-binaries" ]; then
16 echo "binary downloads folder for release ${RELEASE} found, starting generating GHCup metadata..."
17 else
18 echo "The binary downloads for release ${RELEASE} not found."
19 echo "Please run the script to download them first."
22 cd "binary-downloads/cabal-install-${RELEASE}-binaries"
24 cat <<EOF > /dev/stdout
25 $RELEASE:
26 viTags:
27 - Latest
28 viChangeLog: https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-$RELEASE.md
29 viPostInstall: *cabal-${RELEASE//./}-post-install
30 viArch:
31 A_64:
32 Linux_UnknownLinux:
33 unknown_versioning: &cabal-${RELEASE//./}-64
34 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-alpine3_12.tar.xz
35 dlSubdir: cabal-install-$RELEASE
36 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-alpine3_12.tar.xz" | awk '{ print $1 }')
37 Linux_Alpine:
38 unknown_versioning: &cabal-${RELEASE//./}-64
39 Linux_CentOS:
40 unknown_versioning: &cabal-${RELEASE//./}-64-centos7
41 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-centos7.tar.xz
42 dlSubdir: cabal-install-$RELEASE
43 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-centos7.tar.xz" | awk '{ print $1 }')
44 Linux_Debian:
45 ' ( >= 9 && < 10)': &cabal-${RELEASE//./}-64-debian
46 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-deb9.tar.xz
47 dlSubdir: cabal-install-$RELEASE
48 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-deb9.tar.xz" | awk '{ print $1 }')
49 ' ( == 10 && < 11)':
50 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-deb10.tar.xz
51 dlSubdir: cabal-install-$RELEASE
52 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-deb10.tar.xz" | awk '{ print $1 }')
53 ' ( >= 11)':
54 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-deb11.tar.xz
55 dlSubdir: cabal-install-$RELEASE
56 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-deb11.tar.xz" | awk '{ print $1 }')
57 unknown_versioning: &cabal-${RELEASE//./}-64-debian
58 Linux_Fedora:
59 '>= 33':
60 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-fedora33.tar.xz
61 dlSubdir: cabal-install-$RELEASE
62 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-fedora33.tar.xz" | awk '{ print $1 }')
63 unknown_versioning: &cabal-${RELEASE//./}-64-centos7
64 Linux_Ubuntu:
65 '< 20': &cabal-${RELEASE//./}-64-ubuntu18
66 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-ubuntu18_04.tar.xz
67 dlSubdir: cabal-install-$RELEASE
68 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-ubuntu18_04.tar.xz" | awk '{ print $1 }')
69 '>= 20': &cabal-${RELEASE//./}-64-ubuntu20
70 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-ubuntu20_04.tar.xz
71 dlSubdir: cabal-install-$RELEASE
72 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-ubuntu20_04.tar.xz" | awk '{ print $1 }')
73 unknown_versioning: *cabal-${RELEASE//./}-64-ubuntu18
74 Linux_Mint:
75 '< 20': *cabal-${RELEASE//./}-64-ubuntu18
76 '>= 20': *cabal-${RELEASE//./}-64-ubuntu20
77 unknown_versioning: *cabal-${RELEASE//./}-64-ubuntu18
78 Darwin:
79 unknown_versioning:
80 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-darwin.tar.xz
81 dlSubdir: cabal-install-$RELEASE
82 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-darwin.tar.xz" | awk '{ print $1 }')
83 Windows:
84 unknown_versioning:
85 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-windows.zip
86 dlSubdir: cabal-install-$RELEASE
87 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-windows.zip" | awk '{ print $1 }')
88 FreeBSD:
89 unknown_versioning:
90 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-freebsd.tar.xz
91 dlSubdir: cabal-install-$RELEASE
92 dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-freebsd.tar.xz" | awk '{ print $1 }')
93 A_32:
94 Linux_UnknownLinux:
95 unknown_versioning: &cabal-${RELEASE//./}-32
96 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-i386-linux-alpine3_12.tar.xz
97 dlSubdir: cabal-install-$RELEASE
98 dlHash: $(sha256sum "cabal-install-$RELEASE-i386-linux-alpine3_12.tar.xz" | awk '{ print $1 }')
99 Linux_Alpine:
100 unknown_versioning: *cabal-${RELEASE//./}-32
101 Linux_Debian:
102 '( >= 9 )':
103 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-i386-linux-deb9.tar.xz
104 dlSubdir: cabal-install-$RELEASE
105 dlHash: $(sha256sum "cabal-install-$RELEASE-i386-linux-deb9.tar.xz" | awk '{ print $1 }')
106 unknown_versioning: *cabal-${RELEASE//./}-32
107 A_ARM64:
108 Darwin:
109 unknown_versioning:
110 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-aarch64-darwin.tar.xz
111 dlSubdir: cabal-install-$RELEASE
112 dlHash: $(sha256sum "cabal-install-$RELEASE-aarch64-darwin.tar.xz" | awk '{ print $1 }')
113 Linux_Debian:
114 '( >= 10 && < 11)': &cabal-31020-arm64
115 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-aarch64-linux-deb10.tar.xz
116 dlSubdir: cabal-install-$RELEASE
117 dlHash: $(sha256sum "cabal-install-$RELEASE-aarch64-linux-deb10.tar.xz" | awk '{ print $1 }')
118 '( >= 11)':
119 dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-aarch64-linux-deb11.tar.xz
120 dlSubdir: cabal-install-$RELEASE
121 dlHash: $(sha256sum "cabal-install-$RELEASE-aarch64-linux-deb11.tar.xz" | awk '{ print $1 }')
122 unknown_versioning: *cabal-${RELEASE//./}-arm64
123 Linux_UnknownLinux:
124 unknown_versioning: *cabal-${RELEASE//./}-arm64