1010set -u
1111
1212# 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
1414DOTTY_URL=" https://github.com/lampepfl/dotty/releases/download/$DOTTY_VERSION /scala3-$DOTTY_VERSION .zip"
1515
1616# checking if dotty version is available
@@ -34,17 +34,18 @@ if [[ $? -ne 0 ]]; then
3434 exit 1
3535fi
3636
37+ # We don't set LTS versions as default candidates, we prefer Next instead
3738# 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