Skip to content

Commit

Permalink
fix: downloading documentation dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasil Chimev authored and vchimev committed Nov 7, 2017
1 parent f140b5f commit 4460c83
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions build/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,25 @@

get_artifacts() {
BUILD_NAME="$1"
shift

while (( "$#" )) ; do
ARTIFACT_ID="$1"
shift

JENKINS_PREFIX="http://nsbuild01.telerik.com:8080/build/view/Docs/job/"
JENKINS_SUFFIX="/lastSuccessfulBuild/deployedArtifacts/download/artifact.$ARTIFACT_ID/"
URL="$JENKINS_PREFIX$BUILD_NAME$JENKINS_SUFFIX"

wget --clobber --content-disposition "$URL"
echo "URL: $URL"
done
ARTIFACT_ID="$2"
JENKINS_PREFIX="http://nsbuild01.telerik.com:8080/build/view/Docs/job/"
JENKINS_SUFFIX="/lastSuccessfulBuild/artifact/bin/dist/$ARTIFACT_ID.tar.gz"
URL="$JENKINS_PREFIX$BUILD_NAME$JENKINS_SUFFIX"
wget --clobber --content-disposition "$URL"
echo "URL: $URL"
}

get_dependencies() {
rm -rf *.tar.gz
rm -rf _dependencies
mkdir -p _dependencies
(cd _dependencies &&
get_artifacts "sdk-examples-docs-$ENV" 1 && \
get_artifacts "nativescript-angular-docs-$ENV" 1 && \
get_artifacts "modules-docs-$ENV" {1..3} && \
get_artifacts "sidekick-docs-$ENV" 1)
get_artifacts "sdk-examples-docs-$ENV" "sdk-code-samples" && \
get_artifacts "nativescript-angular-docs-$ENV" "nativescript-angular-snippets" && \
get_artifacts "modules-docs-$ENV" "nativescript-api-reference-stable" && \
get_artifacts "modules-docs-$ENV" "nativescript-cookbook-stable" && \
get_artifacts "modules-docs-$ENV" "nativescript-snippets-stable" && \
get_artifacts "sidekick-docs-$ENV" "sidekick-docs")
}

extract_prebuild_dependencies() {
Expand Down

0 comments on commit 4460c83

Please sign in to comment.