Bugfixes to Dockerfile

pull/69/head
Thomas Buckley-Houston 2018-02-02 17:20:37 +08:00
rodzic afca0dd468
commit cdab6bde93
9 zmienionych plików z 55 dodań i 16 usunięć

Wyświetl plik

@ -1,14 +1,22 @@
FROM bitnami/minideb:stretch
RUN install_packages xvfb libgtk-3-0
RUN useradd user
RUN install_packages xvfb libgtk-3-0 curl ca-certificates bzip2 libdbus-glib-1-2
RUN useradd -m user
RUN su user
WORKDIR /home/user
ADD ./interfacer/contrib/setup_firefox.sh .
ENV HOME=/home/user
WORKDIR $HOME
# These are needed to detect versions
ADD .travis.yml .
ADD ./webext/manifest.json .
# Setup Firefox
ENV PATH="/home/user/bin/firefox:${PATH}"
ADD ./interfacer/contrib/setup_firefox.sh .
RUN ./setup_firefox.sh
RUN rm ./setup_firefox.sh && rm .travis.yml
ENV PATH="/home/user/firefox:${PATH}"
ADD ./webpack/manifest.json .
# Setup Browsh
ADD ./interfacer/contrib/setup_browsh.sh .
RUN ./setup_browsh.sh
RUN rm ./setup_browsh.sh && rm manifest.json

Wyświetl plik

@ -32,3 +32,4 @@ fpm:
release:
# Obviously need to remove this when we release properly. Hopefully very soon!
prerelease: true
draft: true

Wyświetl plik

@ -5,15 +5,15 @@
# Browsh in the Dockerfile because that would require signing the webextension
# again, which can't be done as only one canonical release of a webextension is
# allowed by MDN per semantic version. It's actually quite good to not have to
# repeat the build process (after having done so in Travis after successfully
# passing tests). So we simply just download the already built binary :)
# repeat the build process (having done so in Travis after successfully
# passing tests). So we simply just download the already built binary.
PROJECT_ROOT=$(git rev-parse --show-toplevel)
if [ $? -eq 0 ]; then
manifest=$PROJECT_ROOT/webext/manifest.json
if [ ! -f manifest.json ]; then
PROJECT_ROOT=$(git rev-parse --show-toplevel)/webext
else
manifest=./manifest.json
PROJECT_ROOT=.
fi
manifest=$PROJECT_ROOT/manifest.json
line=$(cat $manifest | grep '"version"')
version=$(echo $line | grep -o '".*"' | cut -d " " -f 2 | sed 's/"//g')

Wyświetl plik

@ -2,7 +2,12 @@
set -ex
PROJECT_ROOT=$(git rev-parse --show-toplevel)
if [ ! -f .travis.yml ]; then
PROJECT_ROOT=$(git rev-parse --show-toplevel)
else
PROJECT_ROOT=.
fi
line=$(cat $PROJECT_ROOT/.travis.yml | grep 'firefox: "')
version=$(echo $line | grep -o '".*"' | cut -d " " -f 1 | sed 's/"//g')

Wyświetl plik

@ -0,0 +1,24 @@
// `npm install -g jsonwebtoken`
var jwt = require('jsonwebtoken');
var key = 'user:13243312:78';
var secret = process.env.MDN_KEY;
var issuedAt = Math.floor(Date.now() / 1000);
var payload = {
iss: key,
jti: Math.random().toString(),
iat: issuedAt,
exp: issuedAt + 60,
};
var token = jwt.sign(payload, secret, {
algorithm: 'HS256', // HMAC-SHA256 signing algorithm
});
var auth = 'JWT ' + token;
var path = '848208/browsh-0.2.3-an+fx.xpi';
var base = 'https://addons.mozilla.org/api/v3/file/';
var uri = base + path;
process.stdout.write('curl -H "Authorization: ' + auth + '" ' + uri);

Wyświetl plik

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Browsh",
"version": "0.2.3",
"version": "0.2.4",
"description": "Renders the browser as realtime, interactive, TTY-compatible text",

Wyświetl plik

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Browsh",
"version": "0.2.3",
"version": "0.2.4",
"description": "Renders the browser as realtime, interactive, TTY-compatible text",

Wyświetl plik

@ -75,7 +75,7 @@ export default class extends mixins(HubMixin, TTYCommandsMixin, TabCommandsMixin
this._pollAllTabs((tab) => {
this._ensureTabConnects(tab);
});
}, 100);
}, 1000);
}
_handleTabUpdate(_tab_id, changes, tab) {

Wyświetl plik

@ -32,6 +32,7 @@ export default class FrameBuilder extends BaseBuilder{
}
_setupInit() {
// TODO: Can we not just boot up as soon as we detect the background script?
document.addEventListener("DOMContentLoaded", () => {
this._init();
}, false);