Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
pzurek authored Feb 27, 2019
1 parent fad29f7 commit ef7a678
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@

set -e

// go level up from the workspace
cd ..

// configure Git
git config --global user.email $GIT_USER_EMAIL
git config --global user.name $GIT_USER_NAME

// clone the stoplight repository
git clone https://$STOPLIGHT_USERNAME:$STOPLIGHT_GIT_TOKEN@git.stoplight.io/$STOPLIGHT_ORG/$STOPLIGHT_PROJECT.git
git checkout version/1.0

cp ./workspace/$HUB_FILEPATH ./$STOPLIGHT_PROJECT/$HUB_FILEPATH
// go into the stoplight repo and checkout the "version" branch
cd $STOPLIGHT_PROJECT
git checkout version/1.0

cd workspace
// copy the hub file from workspace to stoplight repo
cp ../workspace/$HUB_FILEPATH $HUB_FILEPATH

// add, commit and push the stoplight repo
git add -A
git commit -m "hub file update from GitHub"
git push

0 comments on commit ef7a678

Please sign in to comment.