Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres committed Sep 5, 2017
1 parent 5f503d8 commit aade281
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ services:
env:
global:
- KUBELESS_VERSION: 0.1.0
- REPO_DOMAIN: serverless
- REPO_NAME: serverless-kubeless
- secure: "s+L8ndj0uMNwqbLvbHePHeMJw2LI8DdEdcq1vJ98hNwHOWQc2mHVB4utG9EZFkaL+RAZYduldSJqr443d2BugxrkmzhLUlM5vDks+zHeKecwTah2uuaMUXVT/y/cWDDTVp3phqSqWbHBMG6u0ImvTVWHpnkux55S3QJTHevvhdodpO6VDTsJCEB3e1d2hHxi0L9tJrFXzQRpooV8IUuODwKBJyhK4CD7rvu0D1gBgHaUNnNLrCy4YTaFl19q5NdZUtrQDC7rpSPOhFI9CBFX8GiFq6nY3XzFASwq/JtKc3K7OLIC7Wqb6JpuvFhG6S1yhBzp73pnoE9U0Bi+YMa3L+nPoh58dCB2ldNCCCMbx7R6PWq/TwYzLvgZZ7queC2kbvCTrtU6JJfmb0CxmX1fnUIpCsNeyXaPuo4Ly6WJeAID32z79CwMo9NH0uOVTLy3LTrLcEfELhBRL5+WkMvKmXUt8yN/jEIa/H38pQN5Y/AnJ0KznO8RZ2nLhi1cR+xUkxfPVZ22Wr2XkbzJDZih/mZR+5GQBfUHWgpUChK+e8dOhplk+4PZJEO6Myja7ykXBPYtL9CV/Xi+1nQqLmfhyChiES201KusJr1IrFklslzCzgrSH8Dv2yaYUTe/Ub/I3gWIhKOXY66gkpmB6MSBJUfMK3uR4/wYfCvbtBTugsY="
install:
- ./scripts/install-test-environment.sh
Expand All @@ -19,8 +21,9 @@ install:
after_success:
- |
if [[ "$TRAVIS_BRANCH" == master && \
"$TRAVIS_PULL_REQUEST" == false ]]; then
REPO_DOMAIN=serverless REPO_NAME=serverless-kubeless ./scripts/release.sh
"$TRAVIS_PULL_REQUEST" == false && \
"$TRAVIS_REPO_SLUG" == "$REPO_DOMAIN/$REPO_NAME" ]]; then
./scripts/release.sh
fi
deploy:
provider: npm
Expand Down
10 changes: 0 additions & 10 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ function release_tag {
git fetch --tags
local last_tag=`curl -s https://api.github.com/repos/$REPO_DOMAIN/$REPO_NAME/tags | jq --raw-output '.[0].name'`
local release_notes=`git log $last_tag..HEAD --oneline`
# Parse relase notes like an list (e.g):
# - 12345abcd Merge pull request #1 Title
# - 12345efgh commit included 1
# - 12345hijk commit included 2
local parsed_release_notes=$(echo "$release_notes" | sed -n -e 'H;${x;s/\n/\\n - /g;s/^\\n//;p;}')
parsed_release_notes=`echo "$parsed_release_notes" | sed -e '${s/ \( - [^ ]* Merge pull request\)/\1/g;}'`
release=`curl -H "Authorization: token $ACCESS_TOKEN" -s --data "{
Expand All @@ -41,12 +37,6 @@ if [[ -z "$REPO_NAME" || -z "$REPO_DOMAIN" ]]; then
exit 1
fi

origin=`git config --get remote.origin.url`
if [[ "$origin" != "https://github.com/$REPO_DOMAIN/$REPO_NAME" ]]; then
echo "The current origin is not the goal of the relase. Skipping..."
exit 0
fi

repo_check=`curl -s https://api.github.com/repos/$REPO_DOMAIN/$REPO_NAME`
if [[ $repo_check == *"Not Found"* ]]; then
echo "Not found a Github repository for $REPO_DOMAIN/$REPO_NAME, it is not possible to publish it" > /dev/stderr
Expand Down

0 comments on commit aade281

Please sign in to comment.