diff --git a/build/tasks/publish-nylas-build-task.coffee b/build/tasks/publish-nylas-build-task.coffee index 27560a88d..850b8ef8a 100644 --- a/build/tasks/publish-nylas-build-task.coffee +++ b/build/tasks/publish-nylas-build-task.coffee @@ -10,7 +10,7 @@ packageVersion = null fullVersion = null module.exports = (grunt) -> - {cp, spawn, rm} = require('./task-helpers')(grunt) + {cp, shouldPublishBuild, spawn, rm} = require('./task-helpers')(grunt) appName = -> grunt.config.get('nylasGruntConfig.appName') dmgName = -> "#{appName().split('.')[0]}.dmg" @@ -125,6 +125,8 @@ module.exports = (grunt) -> uploadToS3(buildZipFilename, key).then(resolve).catch(reject) grunt.registerTask "publish-nylas-build", "Publish Nylas build", -> + return unless shouldPublishBuild() + awsKey = process.env.AWS_ACCESS_KEY_ID ? "" awsSecret = process.env.AWS_SECRET_ACCESS_KEY ? "" diff --git a/docker/ubuntu32/Dockerfile b/docker/ubuntu32/Dockerfile new file mode 100644 index 000000000..62f827de0 --- /dev/null +++ b/docker/ubuntu32/Dockerfile @@ -0,0 +1,37 @@ +# VERSION: 0.1 +# DESCRIPTION: Image to build N1 and create a .deb and .rpm file for 32-bit systems, derived from Atom's Dockerfile + +# Base docker image +FROM 32bit/ubuntu:14.04 + +# Force noninteractive mode +ENV DEBIAN_FRONTEND noninteractive + +# Setup NodeSource repository for Node LTS v4.x +RUN apt-get update && apt-get install -y curl +RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - + +# Correct errors with libpam-systemd (indirect dependency of libnotify4) +RUN /bin/ln -sf /bin/true /sbin/initctl +RUN /usr/bin/touch /etc/init.d/systemd-logind + +# Install dependencies (NodeSource setup runs `apt-get update` for us) +RUN apt-get -y install \ + build-essential \ + fakeroot \ + git \ + libgnome-keyring-dev \ + python \ + rpm \ + nodejs + +# For when Linux testing is re-enabled +# libgconf2-4 \ +# libgtk2.0-0 \ +# libnotify4 \ +# xvfb + +#RUN npm install -g npm@3.3.10 --loglevel error + +ADD . /n1 +WORKDIR /n1 diff --git a/script/cibuild-n1-ubuntu32 b/script/cibuild-n1-ubuntu32 new file mode 100755 index 000000000..9926c6168 --- /dev/null +++ b/script/cibuild-n1-ubuntu32 @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +# --rm \ +docker build -t n1-32 -f ./docker/ubuntu32/Dockerfile . +docker run \ + --env PUBLISH_BUILD="$PUBLISH_BUILD" \ + --env TRAVIS="$TRAVIS" \ + --env TRAVIS_PULL_REQUEST="$TRAVIS_PULL_REQUEST" \ + --env TRAVIS_BRANCH="$TRAVIS_BRANCH" \ + n1-32 /usr/bin/linux32 /n1/script/dockerbuild +docker rmi n1-32 diff --git a/script/dockerbuild b/script/dockerbuild new file mode 100755 index 000000000..f2dac6c08 --- /dev/null +++ b/script/dockerbuild @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e + +script/build +script/grunt mkdeb mkrpm publish-nylas-build --stack --no-color --install-dir /usr diff --git a/script/mkrpm b/script/mkrpm index 7762d0f89..e9f605ab9 100755 --- a/script/mkrpm +++ b/script/mkrpm @@ -11,6 +11,11 @@ APP_FILE_NAME="$5" RPM_BUILD_ROOT=~/rpmbuild ARCH=`uname -m` +# Work around for `uname -m` returning i686 when rpmbuild uses i386 instead +if [ "$ARCH" = "i686" ]; then + ARCH="i386" +fi + # rpmdev-setuptree mkdir -p $RPM_BUILD_ROOT/BUILD mkdir -p $RPM_BUILD_ROOT/SPECS