Created
February 9, 2017 14:36
-
-
Save carlin-q-scott/7d57cb4684fa28c1823169b53997368c to your computer and use it in GitHub Desktop.
travis-ci build for firefox add-ons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: node_js | |
node_js: | |
- "stable" | |
env: | |
global: | |
- DISPLAY=:99.0 | |
- FIREFOX_BIN=./firefox/firefox | |
- JPM_FIREFOX_BINARY=./firefox/firefox | |
before_script: | |
- bash fetch-firefox.sh release-linux64-add-on-devel | |
- sh -e /etc/init.d/xvfb start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copied and slightly modified from https://github.com/lidel/ipfs-firefox-addon/commit/d656832eec807ebae59543982dde96932ce5bb7c | |
# Licensed under Creative Commons - CC0 1.0 Universal - https://github.com/lidel/ipfs-firefox-addon/blob/master/LICENSE | |
BUILD_TYPE=${1:-$FIREFOX_RELEASE} | |
echo "Looking up latest URL for $BUILD_TYPE" | |
BUILD_ROOT="/pub/firefox/tinderbox-builds/mozilla-${BUILD_TYPE}/" | |
ROOT="https://archive.mozilla.org" | |
LATEST=$(curl -s "$ROOT$BUILD_ROOT" | grep $BUILD_TYPE | grep -Po '<a href=".+">\K[[:digit:]]+' | sort -n | tail -1) | |
echo "Latest build located at $ROOT$BUILD_ROOT$LATEST" | |
FILE=$(curl -s "$ROOT$BUILD_ROOT$LATEST/" | grep '.tar.' | grep -Po '<a href="\K[^"]*') | |
echo "URL: $ROOT$FILE" | |
wget -O "firefox-${BUILD_TYPE}.tar.bz2" "$ROOT$FILE" && tar xf "firefox-${BUILD_TYPE}.tar.bz2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment