From c37e56ebd6ec949e0143ed1fbfc5085f81884801 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Sat, 23 Apr 2022 15:35:14 +0530 Subject: [PATCH 1/4] Disable 8.8.4 build in windows gitlab CI The job fails for inscrutable reason, binaries will have to be manually compiled in a VM. --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a677e435d9..5c0353ad13 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,8 +13,6 @@ variables: .windows_matrix: &windows_matrix matrix: - - GHC_VERSION: 8.8.4 - CABAL_PROJECT: cabal.project - GHC_VERSION: 8.10.7 CABAL_PROJECT: cabal.project - GHC_VERSION: 9.0.2 From 5ce21d0a77c1e27e9a81d4f2414fc29bc5e34248 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Sat, 23 Apr 2022 15:41:55 +0530 Subject: [PATCH 2/4] Bump hls-test-utils to 1.3 Also need to bump the minor versions of all packages which were not bumped since 1.6.1.1 and had changes to their testsuite. --- haskell-language-server.cabal | 2 +- hls-test-utils/hls-test-utils.cabal | 2 +- .../hls-alternate-number-format-plugin.cabal | 2 +- plugins/hls-brittany-plugin/hls-brittany-plugin.cabal | 4 ++-- .../hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal | 2 +- .../hls-change-type-signature-plugin.cabal | 2 +- plugins/hls-class-plugin/hls-class-plugin.cabal | 2 +- plugins/hls-eval-plugin/hls-eval-plugin.cabal | 2 +- plugins/hls-floskell-plugin/hls-floskell-plugin.cabal | 4 ++-- plugins/hls-fourmolu-plugin/hls-fourmolu-plugin.cabal | 2 +- .../hls-haddock-comments-plugin.cabal | 2 +- plugins/hls-hlint-plugin/hls-hlint-plugin.cabal | 2 +- plugins/hls-module-name-plugin/hls-module-name-plugin.cabal | 2 +- plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal | 4 ++-- plugins/hls-pragmas-plugin/hls-pragmas-plugin.cabal | 4 ++-- .../hls-qualify-imported-names-plugin.cabal | 2 +- plugins/hls-rename-plugin/hls-rename-plugin.cabal | 2 +- .../hls-selection-range-plugin.cabal | 2 +- plugins/hls-splice-plugin/hls-splice-plugin.cabal | 2 +- .../hls-stylish-haskell-plugin.cabal | 2 +- plugins/hls-tactics-plugin/hls-tactics-plugin.cabal | 2 +- 21 files changed, 25 insertions(+), 25 deletions(-) diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 28e2ddbcc3..98ffbd6616 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -477,7 +477,7 @@ test-suite func-test , lens , lens-aeson , ghcide - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lsp-types , aeson , hls-plugin-api diff --git a/hls-test-utils/hls-test-utils.cabal b/hls-test-utils/hls-test-utils.cabal index da28d16f03..4a90797316 100644 --- a/hls-test-utils/hls-test-utils.cabal +++ b/hls-test-utils/hls-test-utils.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: hls-test-utils -version: 1.2.0.0 +version: 1.3.0.0 synopsis: Utilities used in the tests of Haskell Language Server description: Please see the README on GitHub at diff --git a/plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-plugin.cabal b/plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-plugin.cabal index 76c733966b..c045e625e4 100644 --- a/plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-plugin.cabal +++ b/plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-plugin.cabal @@ -57,7 +57,7 @@ test-suite tests , base >=4.12 && < 5 , filepath , hls-alternate-number-format-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lsp , QuickCheck , regex-tdfa diff --git a/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal b/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal index da8cc68575..28b1f96b6b 100644 --- a/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal +++ b/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: hls-brittany-plugin -version: 1.0.2.0 +version: 1.0.2.1 synopsis: Integration with the Brittany code formatter description: Please see the README on GitHub at @@ -48,4 +48,4 @@ test-suite tests , base , filepath , hls-brittany-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 diff --git a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal index 23504e0dbb..a3d489c20f 100644 --- a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal +++ b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal @@ -55,7 +55,7 @@ test-suite tests , extra , filepath , hls-call-hierarchy-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lens , lsp , lsp-test diff --git a/plugins/hls-change-type-signature-plugin/hls-change-type-signature-plugin.cabal b/plugins/hls-change-type-signature-plugin/hls-change-type-signature-plugin.cabal index 9c317b3ed3..0ddf137da8 100644 --- a/plugins/hls-change-type-signature-plugin/hls-change-type-signature-plugin.cabal +++ b/plugins/hls-change-type-signature-plugin/hls-change-type-signature-plugin.cabal @@ -54,7 +54,7 @@ test-suite tests , base >=4.12 && < 5 , filepath , hls-change-type-signature-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lsp , QuickCheck , regex-tdfa diff --git a/plugins/hls-class-plugin/hls-class-plugin.cabal b/plugins/hls-class-plugin/hls-class-plugin.cabal index 47171eb98c..cea3c03671 100644 --- a/plugins/hls-class-plugin/hls-class-plugin.cabal +++ b/plugins/hls-class-plugin/hls-class-plugin.cabal @@ -53,6 +53,6 @@ test-suite tests , base , filepath , hls-class-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lens , lsp-types diff --git a/plugins/hls-eval-plugin/hls-eval-plugin.cabal b/plugins/hls-eval-plugin/hls-eval-plugin.cabal index 8e67956ccb..490a2486b8 100644 --- a/plugins/hls-eval-plugin/hls-eval-plugin.cabal +++ b/plugins/hls-eval-plugin/hls-eval-plugin.cabal @@ -111,7 +111,7 @@ test-suite tests , filepath , hls-eval-plugin , hls-plugin-api - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lens , lsp-types , text diff --git a/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal b/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal index 11a3d016bd..8416ccbc77 100644 --- a/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal +++ b/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: hls-floskell-plugin -version: 1.0.1.0 +version: 1.0.1.1 synopsis: Integration with the Floskell code formatter description: Please see the README on GitHub at @@ -40,4 +40,4 @@ test-suite tests , base , filepath , hls-floskell-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 diff --git a/plugins/hls-fourmolu-plugin/hls-fourmolu-plugin.cabal b/plugins/hls-fourmolu-plugin/hls-fourmolu-plugin.cabal index 8d7ec5052d..6faa15bcbd 100644 --- a/plugins/hls-fourmolu-plugin/hls-fourmolu-plugin.cabal +++ b/plugins/hls-fourmolu-plugin/hls-fourmolu-plugin.cabal @@ -50,5 +50,5 @@ test-suite tests , filepath , hls-fourmolu-plugin , hls-plugin-api - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lsp-test diff --git a/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal b/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal index 8338495d13..793e751074 100644 --- a/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal +++ b/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal @@ -50,5 +50,5 @@ test-suite tests , base , filepath , hls-haddock-comments-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.2 || ^>=1.3 , text diff --git a/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal b/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal index f7fb3916b4..3ef67e5d99 100644 --- a/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal +++ b/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal @@ -128,7 +128,7 @@ test-suite tests , filepath , hls-hlint-plugin , hls-plugin-api - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lens , lsp-types , text diff --git a/plugins/hls-module-name-plugin/hls-module-name-plugin.cabal b/plugins/hls-module-name-plugin/hls-module-name-plugin.cabal index 5dc19d5f83..29fbe521a0 100644 --- a/plugins/hls-module-name-plugin/hls-module-name-plugin.cabal +++ b/plugins/hls-module-name-plugin/hls-module-name-plugin.cabal @@ -44,4 +44,4 @@ test-suite tests , base , filepath , hls-module-name-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 diff --git a/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal index 6cfc42b654..a903c335c2 100644 --- a/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal +++ b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: hls-ormolu-plugin -version: 1.0.2.0 +version: 1.0.2.1 synopsis: Integration with the Ormolu code formatter description: Please see the README on GitHub at @@ -43,5 +43,5 @@ test-suite tests , base , filepath , hls-ormolu-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lsp-types diff --git a/plugins/hls-pragmas-plugin/hls-pragmas-plugin.cabal b/plugins/hls-pragmas-plugin/hls-pragmas-plugin.cabal index 8c16147163..0bd5835367 100644 --- a/plugins/hls-pragmas-plugin/hls-pragmas-plugin.cabal +++ b/plugins/hls-pragmas-plugin/hls-pragmas-plugin.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: hls-pragmas-plugin -version: 1.0.2.0 +version: 1.0.2.1 synopsis: Pragmas plugin for Haskell Language Server description: Please see the README on GitHub at @@ -46,7 +46,7 @@ test-suite tests , base , filepath , hls-pragmas-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , lens , lsp-types , text diff --git a/plugins/hls-qualify-imported-names-plugin/hls-qualify-imported-names-plugin.cabal b/plugins/hls-qualify-imported-names-plugin/hls-qualify-imported-names-plugin.cabal index 6e15e1abc2..2ba2a6da91 100644 --- a/plugins/hls-qualify-imported-names-plugin/hls-qualify-imported-names-plugin.cabal +++ b/plugins/hls-qualify-imported-names-plugin/hls-qualify-imported-names-plugin.cabal @@ -51,4 +51,4 @@ test-suite tests , text , filepath , hls-qualify-imported-names-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>= 1.2 || ^>=1.3 diff --git a/plugins/hls-rename-plugin/hls-rename-plugin.cabal b/plugins/hls-rename-plugin/hls-rename-plugin.cabal index 3a709f2206..c6f20198fe 100644 --- a/plugins/hls-rename-plugin/hls-rename-plugin.cabal +++ b/plugins/hls-rename-plugin/hls-rename-plugin.cabal @@ -52,4 +52,4 @@ test-suite tests , filepath , hls-plugin-api , hls-rename-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 diff --git a/plugins/hls-selection-range-plugin/hls-selection-range-plugin.cabal b/plugins/hls-selection-range-plugin/hls-selection-range-plugin.cabal index 220e971359..1038b6760a 100644 --- a/plugins/hls-selection-range-plugin/hls-selection-range-plugin.cabal +++ b/plugins/hls-selection-range-plugin/hls-selection-range-plugin.cabal @@ -52,7 +52,7 @@ test-suite tests , containers , filepath , hls-selection-range-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.2 || ^>=1.3 , lsp , lsp-test , text diff --git a/plugins/hls-splice-plugin/hls-splice-plugin.cabal b/plugins/hls-splice-plugin/hls-splice-plugin.cabal index 33ce5be84c..ae13452eaa 100644 --- a/plugins/hls-splice-plugin/hls-splice-plugin.cabal +++ b/plugins/hls-splice-plugin/hls-splice-plugin.cabal @@ -64,5 +64,5 @@ test-suite tests , base , filepath , hls-splice-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.2 || ^>=1.3 , text diff --git a/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal index 835c601374..4c9cf099dd 100644 --- a/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal +++ b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal @@ -42,4 +42,4 @@ test-suite tests , base , filepath , hls-stylish-haskell-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 diff --git a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal index 135607a7c1..781c39028a 100644 --- a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal +++ b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal @@ -160,7 +160,7 @@ test-suite tests , ghcide , hls-plugin-api , hls-tactics-plugin - , hls-test-utils ^>=1.2 + , hls-test-utils ^>=1.3 , hspec , hspec-expectations , lens From 9114c119070004d0b2a4cae9f02b5248d4498326 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Sat, 23 Apr 2022 16:17:58 +0530 Subject: [PATCH 3/4] Add release scripts --- release/README.md | 7 ++ release/fetch_gitlab.py | 76 ++++++++++++++++++++ release/upload.sh | 154 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 237 insertions(+) create mode 100644 release/README.md create mode 100644 release/fetch_gitlab.py create mode 100755 release/upload.sh diff --git a/release/README.md b/release/README.md new file mode 100644 index 0000000000..035e07fda1 --- /dev/null +++ b/release/README.md @@ -0,0 +1,7 @@ +# Making and uploading the Gitlab release to downloads.haskell.org + +1. Run the gitlab release pipeline using https://gitlab.haskell.org/haskell/haskell-language-server/-/pipelines/new +2. Once the pipeline has completed, download the artifacts using `fetch_gitlab.py` + - For example for the `1.7.0.0` release: `python fetch_gitlab.py -p --output haskell-language-server-1.7.0.0 -r 1.7.0.0` + - Ensure all the artifacts in the output directory are accurate and add any missing/extra artifacts +3. `cd` to the output directory created in the previous step, and run `SIGNING_KEY= ../upload.sh` diff --git a/release/fetch_gitlab.py b/release/fetch_gitlab.py new file mode 100644 index 0000000000..1232e26d6d --- /dev/null +++ b/release/fetch_gitlab.py @@ -0,0 +1,76 @@ +# adapted from https://gitlab.haskell.org/bgamari/ghc-utils/-/blob/master/rel-eng/fetch-gitlab-artifacts/fetch_gitlab.py +import logging +from pathlib import Path +import subprocess +import gitlab + +logging.basicConfig(level=logging.INFO) + +def strip_prefix(s, prefix): + if s.startswith(prefix): + return s[len(prefix):] + else: + return None + +def fetch_artifacts(release: str, pipeline_id: int, + dest_dir: Path, gl: gitlab.Gitlab): + dest_dir.mkdir(exist_ok=True) + proj = gl.projects.get('haskell/haskell-language-server') + pipeline = proj.pipelines.get(pipeline_id) + tmpdir = Path("fetch-gitlab") + tmpdir.mkdir(exist_ok=True) + for pipeline_job in pipeline.jobs.list(all=True): + if len(pipeline_job.artifacts) == 0: + logging.info(f'job {pipeline_job.name} ({pipeline_job.id}) has no artifacts') + continue + + job = proj.jobs.get(pipeline_job.id) + platform = strip_prefix(job.name, 'tar-') + if not platform: + logging.info(f'Skipping {job.name} (not a tar job)') + continue + try: + destdir = tmpdir / job.name + zip_name = Path(f"{tmpdir}/{job.name}.zip") + if not zip_name.exists() or zip_name.stat().st_size == 0: + logging.info(f'downloading archive {zip_name} for job {job.name} (job {job.id})...') + with open(zip_name, 'wb') as f: + job.artifacts(streamed=True, action=f.write) + + if zip_name.stat().st_size == 0: + logging.info(f'artifact archive for job {job.name} (job {job.id}) is empty') + continue + + dest = dest_dir / f'haskell-language-server-{release}-{platform}.tar.xz' + if dest.exists(): + logging.info(f'bindist {dest} already exists') + continue + + subprocess.run(['unzip', '-bo', zip_name, '-d', destdir]) + bindist_files = list(destdir.glob('*/haskell-language-server*.tar.xz')) + if len(bindist_files) == 0: + logging.warn(f'Bindist does not exist') + continue + + bindist = bindist_files[0] + logging.info(f'extracted {job.name} to {dest}') + bindist.replace(dest) + except Exception as e: + logging.error(f'Error fetching job {job.name}: {e}') + pass + +def main(): + import argparse + parser = argparse.ArgumentParser() + parser.add_argument('--pipeline', '-p', required=True, type=int, help="pipeline id") + parser.add_argument('--release', '-r', required=True, type=str, help="release name") + parser.add_argument('--output', '-o', type=Path, default=Path.cwd(), help="output directory") + parser.add_argument('--profile', '-P', default='haskell', + help='python-gitlab.cfg profile name') + args = parser.parse_args() + gl = gitlab.Gitlab.from_config(args.profile) + fetch_artifacts(args.release, args.pipeline, + dest_dir=args.output, gl=gl) + +if __name__ == '__main__': + main() diff --git a/release/upload.sh b/release/upload.sh new file mode 100755 index 0000000000..c74c5f7518 --- /dev/null +++ b/release/upload.sh @@ -0,0 +1,154 @@ +#!/usr/bin/env bash + +set -e + +# This is a script for preparing and uploading a release of Haskell Language Server. +# Adapted from https://gitlab.haskell.org/bgamari/ghc-utils/-/commits/master/rel-eng/upload.sh +# +# Usage, +# 1. Set $SIGNING_KEY to your key id (prefixed with '=') +# 2. Create a directory called haskell-langauge-server- and place the binary tarballs there +# 4. Run this script from that directory +# +# You can also invoke the script with an argument to perform only +# a subset of the usual release, +# +# upload.sh gen_hashes generate signed hashes of the release +# tarballs +# upload.sh sign generate signed hashes of the release +# tarballs +# upload.sh upload upload the tarballs and documentation +# to downloads.haskell.org +# +# Prerequisites: moreutils + +# Infer release name from directory name +if [ -z "$rel_name" ]; then + rel_name="$(basename $(pwd))" +fi + +# Infer version from tarball names +if [ -z "$ver" ]; then + ver="$(ls haskell-language-server-*.tar.* | sed -ne 's/haskell-language-server-\([0-9]\+\.[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\).\+/\1/p' | head -n1)" + if [ -z "$ver" ]; then echo "Failed to infer \$ver"; exit 1; fi +fi + +echo HLS version $ver + +host="webhost.haskell.org" + +usage() { + echo "Usage: [rel_name=] SIGNING_KEY= $0 " + echo + echo "where," + echo " rel_name gives the release name (e.g. 1.7.0.0)" + echo "and is one of," + echo " [nothing] do everything below" + echo " gen_hashes generated hashes of the release tarballs" + echo " sign sign hashes of the release tarballs" + echo " upload upload the tarballs and documentation to downloads.haskell.org" + echo " purge_all purge entire release from the CDN" + echo " purge_file file purge a given file from the CDN" + echo " verify verify the signatures in this directory" + echo +} + +if [ -z "$ver" ]; then + usage + exit 1 +fi +if [ -z "$rel_name" ]; then + rel_name="$ver" +fi + +# returns the set of files that must have hashes generated. +function hash_files() { + echo $(find -maxdepth 1 \ + -iname '*.xz' \ + -o -iname '*.lz' \ + -o -iname '*.bz2' \ + -o -iname '*.zip' \ + ) + echo $(find -maxdepth 1 -iname '*.patch') +} + +function gen_hashes() { + echo -n "Hashing..." + sha1sum $(hash_files) >| SHA1SUMS & + sha256sum $(hash_files) >| SHA256SUMS & + wait + echo "done" +} + +function sign() { + # Kill DISPLAY lest pinentry won't work + DISPLAY= + eval "$(gpg-agent --daemon --sh --pinentry-program $(which pinentry))" + for i in $(hash_files) SHA1SUMS SHA256SUMS; do + if [ -e $i -a -e $i.sig -a $i.sig -nt $i ]; then + echo "Skipping signing of $i" + continue + elif [ -e $i.sig ] && gpg2 --verify $i.sig; then + # Don't resign if current signature is valid + touch $i.sig + continue + fi + echo "Signing $i" + rm -f $i.sig + gpg2 --use-agent --detach-sign --local-user="$SIGNING_KEY" $i + done +} + +function verify() { + if [ $(find -iname '*.sig' | wc -l) -eq 0 ]; then + echo "No signatures to verify" + return + fi + + for i in *.sig; do + echo + echo Verifying $i + gpg2 --verify $i $(basename $i .sig) + done +} + +function upload() { + verify + chmod ugo+r,o-w -R . + dir=$(echo $rel_name | sed s/-release//) + lftp -c " \ + open -u hls-downloads: sftp://$host && \ + mirror -P20 -c --reverse --exclude=fetch-gitlab --exclude=out . hls/$dir && \ + wait all;" + chmod ugo-w $(ls *.xz *.bz2 *.zip) +} + +function purge_all() { + # Purge CDN cache + curl -X PURGE http://downloads.haskell.org/hls/ + curl -X PURGE http://downloads.haskell.org/~hls/ + curl -X PURGE http://downloads.haskell.org/hls/$dir + curl -X PURGE http://downloads.haskell.org/hls/$dir/ + curl -X PURGE http://downloads.haskell.org/~hls/$dir + curl -X PURGE http://downloads.haskell.org/~hls/$dir/ + for i in *; do + purge_file $i + done +} + +function purge_file() { + curl -X PURGE http://downloads.haskell.org/~hls/$rel_name/$i + curl -X PURGE http://downloads.haskell.org/~hls/$rel_name/$i/ + curl -X PURGE http://downloads.haskell.org/hls/$rel_name/$i + curl -X PURGE http://downloads.haskell.org/hls/$rel_name/$i/ +} + + +if [ "x$1" == "x" ]; then + gen_hashes + sign + upload + purge_all +else + $@ +fi From b1e084ed06b32e782453b52554cb491d977b0f9e Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Mon, 25 Apr 2022 06:29:25 +0530 Subject: [PATCH 4/4] Fix windows CI --- .gitlab-ci.yml | 4 ++-- .gitlab/tar.sh | 2 +- GNUmakefile | 2 +- bindist/ghcs-Msys | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 bindist/ghcs-Msys diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c0353ad13..4d4ad3ccc5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,10 +17,10 @@ variables: CABAL_PROJECT: cabal.project - GHC_VERSION: 9.0.2 CABAL_PROJECT: cabal-ghc90.project - - GHC_VERSION: 9.2.1 - CABAL_PROJECT: cabal-ghc92.project - GHC_VERSION: 9.2.2 CABAL_PROJECT: cabal-ghc92.project + - GHC_VERSION: 9.2.1 + CABAL_PROJECT: cabal-ghc92.project workflow: rules: diff --git a/.gitlab/tar.sh b/.gitlab/tar.sh index bca0a5d8a7..7e6754fad3 100755 --- a/.gitlab/tar.sh +++ b/.gitlab/tar.sh @@ -10,7 +10,7 @@ ls -la out/ TARBALL_PREFIX="haskell-language-server" case "${TARBALL_EXT}" in zip) - HLS_VERSION="$("$CI_PROJECT_DIR/out/haskell-language-server-wrapper" --numeric-version)" + HLS_VERSION="$("$CI_PROJECT_DIR/out/haskell-language-server-8.10.7" --numeric-version)" cd out/ zip "${TARBALL_PREFIX}-${HLS_VERSION}-${TARBALL_ARCHIVE_SUFFIX}.zip" haskell-language-server-* find . -type f ! -name '*.zip' -delete diff --git a/GNUmakefile b/GNUmakefile index 15a0066857..b9c848798c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -66,7 +66,7 @@ define set_rpath endef hls: bindist/ghcs - for ghc in $(shell [ -e "bindist/ghcs-`uname`" ] && cat "bindist/ghcs-`uname`" || cat "bindist/ghcs") ; do \ + for ghc in $(shell [ -e "bindist/ghcs-`uname -o`" ] && cat "bindist/ghcs-`uname -o`" || cat "bindist/ghcs") ; do \ $(GHCUP) -v install ghc `echo $$ghc | $(AWK) -F ',' '{ print $$1 }'` && \ $(GHCUP) -v gc -p -s -c && \ $(MAKE) GHC_VERSION=`echo $$ghc | $(AWK) -F ',' '{ print $$1 }'` PROJECT_FILE=`echo $$ghc | $(AWK) -F ',' '{ print $$2 }'` hls-ghc && \ diff --git a/bindist/ghcs-Msys b/bindist/ghcs-Msys new file mode 100644 index 0000000000..a6210abe73 --- /dev/null +++ b/bindist/ghcs-Msys @@ -0,0 +1,4 @@ +8.10.7,cabal.project +9.0.2,cabal-ghc90.project +9.2.2,cabal-ghc92.project +9.2.1,cabal-ghc92.project