Skip to content

Commit

Permalink
travis: build and package
Browse files Browse the repository at this point in the history
  • Loading branch information
lt-mayonesa committed Mar 30, 2019
1 parent 0409f20 commit 2bebbbc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 7 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -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;

0 comments on commit 2bebbbc

Please sign in to comment.