Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #834 from OpenBazaar/add-rpm
Browse files Browse the repository at this point in the history
Add support to build RPM binaries
  • Loading branch information
jjeffryes authored Sep 22, 2017
2 parents 1561874 + 1ef9b5c commit 3509e04
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ deploy:
- "dist/osx/*.zip"
- "dist/linux32/*.deb"
- "dist/linux64/*.deb"
- "dist/linux32/*.rpm"
- "dist/linux64/*.rpm"
skip_cleanup: true
all_branches: true
on:
Expand Down
16 changes: 13 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ case "$TRAVIS_OS_NAME" in
mkdir dist/linux64

echo 'Install npm packages for Linux'
npm install --save-dev electron-installer-debian --silent
npm install -g --save-dev electron-installer-debian --silent
npm install -g --save-dev electron-installer-redhat --silent

# Install rpmbuild
sudo apt-get install rpm

# Ensure fakeroot is installed
sudo apt-get install fakeroot
Expand All @@ -74,7 +78,7 @@ case "$TRAVIS_OS_NAME" in
APPNAME="openbazaar2"

echo "Packaging Electron application"
electron-packager . ${APPNAME} --platform=linux --arch=ia32 --=${ELECTRONVER} --overwrite --prune --out=dist
electron-packager . ${APPNAME} --platform=linux --arch=ia32 --version=${ELECTRONVER} --overwrite --prune --out=dist

echo 'Move go server to electron app'
mkdir dist/${APPNAME}-linux-ia32/resources/openbazaar-go/
Expand All @@ -85,12 +89,15 @@ case "$TRAVIS_OS_NAME" in
echo 'Create debian archive'
electron-installer-debian --config .travis/config_ia32.json

echo 'Create RPM archive'
electron-installer-redhat --config .travis/config_ia32.json

echo 'Sign the installer'

echo 'Building Linux 64-bit Installer....'

echo "Packaging Electron application"
electron-packager . ${APPNAME} --platform=linux --arch=x64 --=${ELECTRONVER} --overwrite --prune --out=dist
electron-packager . ${APPNAME} --platform=linux --arch=x64 --version=${ELECTRONVER} --overwrite --prune --out=dist

echo 'Move go server to electron app'
mkdir dist/${APPNAME}-linux-x64/resources/openbazaar-go/
Expand All @@ -101,6 +108,9 @@ case "$TRAVIS_OS_NAME" in
echo 'Create debian archive'
electron-installer-debian --config .travis/config_amd64.json

echo 'Create RPM archive'
electron-installer-redhat --config .travis/config_amd64.json

echo 'Sign the installer'


Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"copyfiles": "^1.0.0",
"cross-env": "^1.0.8",
"electron": "^1.4.15",
"electron-installer-debian": "^0.5.2",
"electron-installer-redhat": "^0.5.0",
"electron-winstaller": "2.5.2",
"eslint": "^2.13.1",
"eslint-config-airbnb": "^9.0.1",
"eslint-config-defaults": "^9.0.0",
Expand All @@ -56,8 +59,7 @@
"node-sass": "^3.13.0",
"nodemon": "^1.9.2",
"npm-run-all": "^2.2.0",
"sinon": "^1.17.6",
"electron-winstaller": "2.5.2"
"sinon": "^1.17.6"
},
"pre-commit": [
"lint",
Expand Down

0 comments on commit 3509e04

Please sign in to comment.