File tree Expand file tree Collapse file tree 4 files changed +34
-6
lines changed Expand file tree Collapse file tree 4 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 46
46
run : |
47
47
New-Item -ItemType Directory -ErrorAction SilentlyContinue build/cs-api-${{ steps.build_version.outputs.value }}-windows
48
48
Copy-Item _build/install/default/bin/cs-api.exe build/cs-api-${{ steps.build_version.outputs.value }}-windows/
49
+ - name : Download and bundle libcurl
50
+ shell : bash
51
+ env :
52
+ SHELLOPTS : igncr
53
+ run : |
54
+ bash ci/static-dl \
55
+ --url https://curl.se/windows/dl-8.9.1_1/curl-8.9.1_1-win64-mingw.zip \
56
+ --hash f7bc9e21490d942c937dfe7bfcb9a2e29a490665c8b51e8ea0cdc171ac08c5de \
57
+ --out /tmp/curl.zip
58
+ mkdir /tmp/curl
59
+ unzip -q /tmp/curl.zip -d /tmp/curl
60
+ cp /tmp/curl/*/bin/libcurl-x64.dll build/cs-api-${{ steps.build_version.outputs.value }}-windows/libcurl-4.dll
49
61
- name : Upload the compiled binary
50
62
uses : actions/upload-artifact@v4
51
63
with :
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
8
## Unreleased
9
9
10
- _ There are no unreleased changes at the moment._
10
+ ### Added
11
+
12
+ - The Windows release now ships with ` libcurl-4.dll ` (from https://curl.se/windows/ ).
11
13
12
14
## [ 2.7.0] - 2024-08-02
13
15
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ RUN apt-get update \
28
28
USER "$user"
29
29
30
30
# Add script for downloading files
31
- COPY --chown="$user:$user" docker /static-dl /usr/local/bin/static-dl
31
+ COPY --chown="$user:$user" ci /static-dl /usr/local/bin/static-dl
32
32
RUN chmod +x /usr/local/bin/static-dl
33
33
34
34
RUN mkdir "/home/$user/workdir"
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ set -o errexit
3
3
set -o nounset
4
4
set -o pipefail
5
5
6
- # Download a file with `wget` and check its SHA-256 hash.
6
+ # Download a file with `curl` or ` wget` and check its SHA-256 hash.
7
7
#
8
8
# To download with a hash check:
9
9
#
@@ -24,20 +24,34 @@ show_hash_and_fail() {
24
24
local url=$1 ; shift
25
25
local file=$1 ; shift
26
26
27
- local hash=$( sha256sum " $file " | cut -f 1 -d " " )
27
+ local hash
28
+ hash=$( sha256sum " $file " | cut -f 1 -d " " )
28
29
echo " Actual hash for $url : $hash " >&2
29
30
return 1
30
31
}
31
32
33
+ download () {
34
+ local url=$1 ; shift
35
+ local out=$1 ; shift
36
+
37
+ # If curl is found, use it, otherwise use wget.
38
+ if command -v curl > /dev/null; then
39
+ curl --location --output " $out " " $url "
40
+ else
41
+ wget --output-document " $out " " $url "
42
+ fi
43
+ }
44
+
32
45
main () {
33
46
local url=$1 ; shift
34
47
local hash_=$1 ; shift
35
48
local out=$1 ; shift
36
49
37
- local tmp_dir=$( mktemp --directory)
50
+ local tmp_dir
51
+ tmp_dir=$( mktemp --directory)
38
52
local tmp_file=" $tmp_dir /downloaded"
39
53
40
- wget -nv -O " $tmp_file " " $url "
54
+ download " $url " " $tmp_file "
41
55
echo " $hash_ $tmp_file " | sha256sum --check --strict \
42
56
|| show_hash_and_fail " $url " " $tmp_file "
43
57
You can’t perform that action at this time.
0 commit comments