forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revert "Add cloud-sdk-java as dependency (elastic#22)" This reverts commit 6a823b7. * Implement circularly dependent gradle task as bash script, add dependency to buildSrc * update readme
- Loading branch information
Showing
4 changed files
with
34 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
repositories { | ||
flatDir { | ||
dirs 'libs' | ||
} | ||
} | ||
|
||
dependencies { | ||
compile group: 'co.elastic.cloud', name: 'sdk-java', version: "1.2.0-SNAPSHOT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
export PYTHONIOENCODING=utf8 | ||
|
||
libsDir="buildSrc/libs" | ||
ghOwner="${GH_OWNER:?GH_OWNER needs to be set!}" | ||
ghToken="${GH_TOKEN:?GH_TOKEN needs to be set!}" | ||
sdkVersion="${SDK_VERSION:?SDK_VERSION needs to be set!}" | ||
|
||
getReleaseByTagUrl="https://api.github.com/repos/${ghOwner}/cloud-sdk-java/releases/tags/v${sdkVersion}?access_token=${ghToken}" | ||
|
||
if [ ! -d ${libsDir} ]; then | ||
echo "Creating libs directory..." | ||
mkdir ${libsDir} | ||
echo "Created!" | ||
fi | ||
|
||
getReleaseByTagResponse=$(curl -s ${getReleaseByTagUrl}) | ||
assetName=$(curl -s ${getReleaseByTagUrl} | python -c "import sys, json;print json.load(sys.stdin)['assets'][0]['name']") | ||
assetUrl=$(curl -s ${getReleaseByTagUrl} | python -c "import sys, json; print json.load(sys.stdin)['assets'][0]['url']") | ||
assetUrlWithAuth="${assetUrl}?access_token=${ghToken}" | ||
downloadResponse=$(curl -L -H "Accept: application/octet-stream" ${assetUrlWithAuth} -o ${libsDir}/${assetName}) |