File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 32
32
PACKAGES=(" compiler-builtins" " @rescript/react" )
33
33
34
34
echo " Uploading compiler.js file..."
35
- curl --ftp-create-dirs -T " ${SCRIPT_DIR} /compiler.js" --ssl --netrc-file $NETRC_FILE ftp://${KEYCDN_SRV} /v${VERSION} /compiler.js
35
+ curl --ftp-create-dirs -T " ${SCRIPT_DIR} /compiler.js" --ssl --tls-max 1.2 -- netrc-file $NETRC_FILE ftp://${KEYCDN_SRV} /v${VERSION} /compiler.js
36
36
37
37
echo " ---"
38
38
echo " Uploading packages cmij files..."
43
43
44
44
echo " Uploading '$SOURCE /cmij.js' to '$TARGET /cmij.js'..."
45
45
46
- curl --ftp-create-dirs -T " ${SOURCE} /cmij.js" --ssl --netrc-file $NETRC_FILE " ${TARGET} /cmij.js"
46
+ curl --ftp-create-dirs -T " ${SOURCE} /cmij.js" --ssl --tls-max 1.2 -- netrc-file $NETRC_FILE " ${TARGET} /cmij.js"
47
47
done
48
48
49
49
# we now upload the bundled stdlib runtime files
@@ -54,4 +54,6 @@ TARGET="ftp://${KEYCDN_SRV}/v${VERSION}/${DIR}"
54
54
55
55
echo " Uploading '$SOURCE /*.js' to '$TARGET /*.js'..."
56
56
57
- find " ${SOURCE} " -type f -name " *.js" -exec sh -c ' curl --ftp-create-dirs --ssl --netrc-file "$0" -T "$1" "${2}/$(basename "$1")"' " $NETRC_FILE " {} " $TARGET " \;
57
+ # we use TLS 1.2 because 1.3 sometimes causes data losses (files capped at 16384B)
58
+ # https://github.com/curl/curl/issues/6149#issuecomment-1618591420
59
+ find " ${SOURCE} " -type f -name " *.js" -exec sh -c ' curl --ftp-create-dirs --ssl --tls-max 1.2 --netrc-file "$0" -T "$1" "${2}/$(basename "$1")"' " $NETRC_FILE " {} " $TARGET " \;
You can’t perform that action at this time.
0 commit comments