Skip to content

Commit

Permalink
don't use forward slashes in sed when string has forward slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
benbrackenc74 committed May 26, 2016
1 parent ad24a80 commit baa51f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ script:
- PACKAGE_NAME=`echo $TRAVIS_REPO_SLUG | sed 's/.*\///g'`
- PACKAGE_REV=`echo $TRAVIS_COMMIT | sed -e 's/^[[:alnum:]]\{6\}/&-/g' | sed 's/-.*//'`
- PAYLOAD=`( cat ./slack_payload.json)`
- PAYLOAD_PARSE=$(echo $PAYLOAD | sed -e "s/\$PACKAGE_NAME/$PACKAGE_NAME/g" -e "s/\$PACKAGE_REV/$PACKAGE_REV/g" -e "s/\$TRAVIS_REPO_SLUG/$TRAVIS_REPO_SLUG/g" -e "s/\$TRAVIS_BUILD_NUMBER/$TRAVIS_BUILD_NUMBER/g" -e "s/\$PACKAGE_REV/$PACKAGE_REV/g")
- PAYLOAD_PARSE=$(echo $PAYLOAD | sed -e "s/\$PACKAGE_NAME/$PACKAGE_NAME/g" -e "s/\$PACKAGE_REV/$PACKAGE_REV/g" -e "s:\$TRAVIS_REPO_SLUG:$TRAVIS_REPO_SLUG:g" -e "s/\$TRAVIS_BUILD_NUMBER/$TRAVIS_BUILD_NUMBER/g" -e "s/\$PACKAGE_REV/$PACKAGE_REV/g")
- mkdir $PACKAGE_NAME
- if [ -e *.json ]; then cp *.json $PACKAGE_NAME; fi
- if [ -e *.md ]; then cp *.json $PACKAGE_NAME; fi
Expand Down
2 changes: 1 addition & 1 deletion slack_payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"icon_url":"https://a.slack-edge.com/0180/img/services/travis_48.png",
"attachments": [
{
"pretext": "Build # <https://travis-ci.com/$TRAVIS_REPO_SLUG/$TRAVIS_JOB_ID|$TRAVIS_BUILD_NUMBER> ($PACKAGE_REV) of $TRAVIS_REPO_SLUG",
"pretext": "Build # <https://travis-ci.com/'$TRAVIS_REPO_SLUG'/$TRAVIS_JOB_ID|$TRAVIS_BUILD_NUMBER> ($PACKAGE_REV) of $TRAVIS_REPO_SLUG",
"color": "good",
"text":"<https://s3-us-west-2.amazonaws.com/cycling74-ci/$PACKAGE_NAME/$PACKAGE_NAME-$PACKAGE_REV.zip>"
}
Expand Down

0 comments on commit baa51f2

Please sign in to comment.