diff --git a/.travis.yml b/.travis.yml index fd8ba3f..64a19ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,15 +21,22 @@ before_script: script: - karma start --single-run --browsers Firefox - - ./build.sh before_deploy: - ./node_modules/.bin/esdoc + - ./build.sh $TRAVIS_TAG deploy: - provider: pages - skip_cleanup: true - github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard - local_dir: docs - on: - branch: master + - provider: pages + skip_cleanup: true + github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard + local_dir: docs + on: + branch: master + - provider: releases + api_key: $GITHUB_TOKEN + file_glob: true + file: browser-mpris2-*.zip + skip_cleanup: true + on: + tags: true diff --git a/build.sh b/build.sh index 04b48b9..39fef73 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Compile all source codes into dist/ folder +# Compile all javascript source codes into dist/ folder -out="dist/" +out="extension/" lang_out="ECMASCRIPT_2015" function title() { @@ -40,5 +40,10 @@ cat manifest.json | \ sed -i -e 's,src/,,g' ${out}manifest.json echo "Generated ${out}manifest.json ✓" +# Compress extension and native to a release zip +title "Step 6: Zip Release" +zip -r "browser-mpris2-$1.zip" ${out} native/ +echo "Created realease .zip for version $1 ✓" + title "DONE ✓" exit 0;