10
10
set -u
11
11
12
12
# latest stable dotty version
13
- DOTTY_VERSION=$( curl -s https://api.github.com/repos/lampepfl/dotty/releases/latest | grep ' "tag_name": ' | sed -E ' s/.*"([^"]+)".*/\1/ ' )
13
+ DOTTY_VERSION=$1
14
14
DOTTY_URL=" https://github.com/lampepfl/dotty/releases/download/$DOTTY_VERSION /scala3-$DOTTY_VERSION .zip"
15
15
16
16
# checking if dotty version is available
@@ -34,17 +34,18 @@ if [[ $? -ne 0 ]]; then
34
34
exit 1
35
35
fi
36
36
37
+ # We don't set LTS versions as default candidates, we prefer Next instead
37
38
# Set DOTTY_VERSION as Default for Candidate
38
- curl --silent --show-error --fail \
39
- -X PUT \
40
- -H " Consumer-Key: $SDKMAN_KEY " \
41
- -H " Consumer-Token: $SDKMAN_TOKEN " \
42
- -H " Content-Type: application/json" \
43
- -H " Accept: application/json" \
44
- -d ' {"candidate": "scala", "version": "' " $DOTTY_VERSION " ' "}' \
45
- https://vendors.sdkman.io/default
46
-
47
- if [[ $? -ne 0 ]]; then
48
- echo " Fail sending PUT request to announcing the release of scala on SDKMAN."
49
- exit 1
50
- fi
39
+ # curl --silent --show-error --fail \
40
+ # -X PUT \
41
+ # -H "Consumer-Key: $SDKMAN_KEY" \
42
+ # -H "Consumer-Token: $SDKMAN_TOKEN" \
43
+ # -H "Content-Type: application/json" \
44
+ # -H "Accept: application/json" \
45
+ # -d '{"candidate": "scala", "version": "'"$DOTTY_VERSION"'"}' \
46
+ # https://vendors.sdkman.io/default
47
+
48
+ # if [[ $? -ne 0 ]]; then
49
+ # echo "Fail sending PUT request to announcing the release of scala on SDKMAN."
50
+ # exit 1
51
+ # fi
0 commit comments