Skip to content

Commit

Permalink
Add other steps to README + scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
winks committed Feb 15, 2019
1 parent 5afec70 commit e643694
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Release this zip file (manually) in the `leiningen/leiningen-sdkman` repo and jot down the URL
* attention: the name needs to match the version, e.g. ´.../releases/download/2.9.0-beta1/leiningen-2.9.0-beta1.zip´

## Releasing
## Releasing a candidate

To release a candidate version on sdkman:

Expand All @@ -35,3 +35,21 @@ export CONSUMER_TOKEN=y
Now this can be tested via `sdk install leiningen VERSION`.

The next steps are documented here: https://sdkman.io/vendors

## Making the release the default release

```
export CONSUMER_KEY=x
export CONSUMER_TOKEN=y
./release-default.sh VERSION
```

## Announcing the release at sdkman

```
export CONSUMER_KEY=x
export CONSUMER_TOKEN=y
./announce-release.sh VERSION
```
18 changes: 18 additions & 0 deletions announce-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [ "$1" = "" ]; then
echo "Usage: $0 VERSION"
exit
fi

VERSION="$1"

curl -X POST \
-H "Consumer-Key: ${CONSUMER_KEY}" \
-H "Consumer-Token: ${CONSUMER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{\"candidate\": \"leiningen\", \"version\": \"${VERSION}\", \"hashtag\": \"leiningen\"}" \
https://vendors.sdkman.io/announce/struct

echo
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test -d "$OUT_DIR" || mkdir -p "$OUT_DIR"

FILE_NAME="${OUT_DIR}/${SUB_DIR}.zip"

zip "FILE_NAME" "$SUB_DIR"
zip -r "$FILE_NAME" "$SUB_DIR"

echo
echo "Leiningen ${VERSION} was packaged to ${FILE_NAME}"
Expand Down
18 changes: 18 additions & 0 deletions release-default.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [ "$1" = "" ]; then
echo "Usage: $0 VERSION"
exit
fi

VERSION="$1"

curl -X PUT \
-H "Consumer-Key: ${CONSUMER_KEY}" \
-H "Consumer-Token: ${CONSUMER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{\"candidate\": \"leiningen\", \"version\": \"${VERSION}\"}" \
https://vendors.sdkman.io/default

echo
2 changes: 2 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ curl -X POST \
-H "Accept: application/json" \
-d "{\"candidate\": \"leiningen\", \"version\": \"${VERSION}\", \"url\": \"${URL}\"}" \
https://vendors.sdkman.io/release

echo

0 comments on commit e643694

Please sign in to comment.