Skip to content

Commit

Permalink
feat(docs): Alter documentation publishing to work on Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Oliveri committed Jan 5, 2019
1 parent e754bfb commit 160f23e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Scripts/publish-documentation.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/bin/bash

# Generate API docs and upload them to Github on the gh-pages branch
# IMPORTANT: This is only meant to be called from Travis builds!
# IMPORTANT: This is only meant to be called from Jenkins!

set -e

# Configure Travis to be able to push to the Github repo
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
# Configure Jenkins to be able to push to the Github repo
git config --global user.name "Jenkins"
git remote rm origin
git remote add origin https://watson-developer-cloud:${GH_TOKEN}@github.com/watson-developer-cloud/swift-sdk.git
# git remote add origin https://watson-developer-cloud:${GH_TOKEN}@github.com/watson-developer-cloud/swift-sdk.git
git remote add origin https://AnthonyOliveri:${GH_TOKEN}@github.com/watson-developer-cloud/swift-sdk.git
git fetch
git fetch --tags
latestVersion=$(git describe --abbrev=0 --tags)
Expand Down

0 comments on commit 160f23e

Please sign in to comment.