Add request-preview.sh
set -e +o pipefail
-VERSION="tbd"
+# VERSION="tbd"
-# url="https://preview.nrelabs.io/"
-url="http://127.0.0.1:8080/webhook"
+url="https://preview.nrelabs.io/webhook"
+# url="http://127.0.0.1:8080/webhook"
# https://docs.travis-ci.com/user/environment-variables/
# commit="${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}"
@@ -42,9 +42,9 @@ url="http://127.0.0.1:8080/webhook"
# TRAVIS_TAG -
# TRAVIS_BRANCH - master
-TRAVIS_PULL_REQUEST="323"
-TRAVIS_REPO_SLUG="nre-learning/nrelabs-curriculum"
-TRAVIS_BRANCH="master"
+# TRAVIS_PULL_REQUEST="323"
+# TRAVIS_REPO_SLUG="nre-learning/nrelabs-curriculum"
+# TRAVIS_BRANCH="master"
curl $url --header "Content-Type: application/json" \
--data "{
@@ -54,41 +54,4 @@ curl $url --header "Content-Type: application/json" \
\"prSha\":\"$TRAVIS_PULL_REQUEST_SHA\"
}"
-# # find branch, commit, repo from git command
-# if [ "$GIT_BRANCH" != "" ];
-# then
-# branch="$GIT_BRANCH"
-
-# elif [ "$branch" = "" ];
-# then
-# branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || hg branch 2>/dev/null || echo "")
-# if [ "$branch" = "HEAD" ];
-# then
-# branch=""
-# fi
-# fi
-
-# if [ "$commit_o" = "" ];
-# then
-# # merge commit -> actual commit
-# mc=
-# if [ -n "$pr" ] && [ "$pr" != false ];
-# then
-# mc=$(git show --no-patch --format="%P" 2>/dev/null || echo "")
-# fi
-# if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
-# then
-# say " Fixing merge commit SHA"
-# commit=$(echo "$mc" | cut -d' ' -f2)
-# elif [ "$GIT_COMMIT" != "" ];
-# then
-# commit="$GIT_COMMIT"
-# elif [ "$commit" = "" ];
-# then
-# commit=$(git log -1 --format="%H" 2>/dev/null || hg id -i --debug 2>/dev/null | tr -d '+' || echo "")
-# fi
-# else
-# commit="$commit_o"
-# fi
-
-exit ${exit_with}
+exit 0
