diff --git a/.travis.yml b/.travis.yml index 5b6279629..a1499f80b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,16 @@ node_js: - "10" notifications: email: false +script: + - npm run eslint + - npm run abaplint deploy: provider: script - script: ./travis.sh + script: ./ci/deploy-merged-build.sh skip_cleanup: true on: branch: master + tags: false env: global: secure: "JEKitZ+1to7pt4/lLcWJ0mtWuCRFxEBbps9hEFtHrenxBZR0dSekrLkhXBm9qRLJ6b0QLdYV0855/BiZlvOWuecB5kujbYLoCClx7+DWFszLQKgLf9UPbBoqkoLhvAtpGbAx7aMuBrqFnAD4ZBjybjEDJ5SHnxsWfu7AA2YrtPOUZvFZLqdP4muhwfVuYv+1CRZNJMZHtR4lw1R7kVQggaQmD04iMP/NKQuqNyjEC13zUxDLv5tskDAvl3OrPA3Ybx7Z0GM6piA+EkUoXtc3qnpe7e7j0IHBWpLwOjBOju4n1gMdZ13q1UzoLLsJV17jrg8tSoWw/F/Yqlo50qdRAsg6RCX4k5UpIP7mttStb9iT2pZlfwIAWHQF6aN67ic8F/AuPquMHKEgu/qfj1NK+6lfX0OHM6ovtAnNOozkSUikf7JxMeTlZLLOk+ZSTIYbxDsojMra8jeYmLtOLeFRu485fooXPt0n0aAzHDNuq7xQejvWZ0TGgxytc+A5b5y9YTsLSTZrQZmnxPweSgDSfLPY5HXK51nzEYGSP0tP4BlPAxysAsFoeLgr4oiham1ZxKfCNs7g5Cjc6Zbo1Zuq4Iza4HFl57I96QgyjFLgyFTdzfK6HJvUyIb/+fLK2RfCy0QbYboHej2Ki111I5UjkYITd+nyzmYiX9clJqSBeww=" diff --git a/ci/deploy-merged-build.sh b/ci/deploy-merged-build.sh new file mode 100755 index 000000000..37738d16b --- /dev/null +++ b/ci/deploy-merged-build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Build merged +npm run merge || exit 1 +wc -l ./zabapgit.abap + +# Deploy artifacts +git clone https://github.com/abapGit/build.git ../build +cp zabapgit.abap ../build/zabapgit.abap +cd ../build + +# Commit +git status +git config user.email "builds@travis-ci.com" +git config user.name "Travis CI" +git add zabapgit.abap +git commit -m "Travis build $TRAVIS_BUILD_NUMBER" || exit 1 +git push -q https://$GITHUB_API_KEY@github.com/abapGit/build.git > /dev/null 2>&1 diff --git a/package.json b/package.json index 4c414cfbc..c56e173a0 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,9 @@ { "license": "MIT", "scripts": { - "pretest": "abaplint --version && abaplint", - "test": "npm run eslint", - "posttest": "abapmerge src/zabapgit.prog.abap > zabapgit.abap", - "_disabled_posttest": "abaplint zabapgit.abap", - "lint": "abaplint", + "test": "npm run eslint && npm run abaplint", + "merge": "abapmerge -f src/zabapgit.prog.abap > zabapgit.abap", + "abaplint": "abaplint", "eslint": "eslint src" }, "repository": { diff --git a/travis.sh b/travis.sh deleted file mode 100755 index b3f52cd0c..000000000 --- a/travis.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -abapmerge -f src/zabapgit.prog.abap > ../zabapgit.abap || exit 1 -wc -l ../zabapgit.abap -cd .. -git clone https://github.com/abapGit/build.git -ls -l -cp zabapgit.abap build/zabapgit.abap -cd build -git status -git config --global user.email "builds@travis-ci.com" -git config --global user.name "Travis CI" -git add zabapgit.abap -git commit -m "Travis build $TRAVIS_BUILD_NUMBER" -git push -q https://$GITHUB_API_KEY@github.com/abapGit/build.git > /dev/null 2>&1