Linux and Windows builds
Summary: Adds windows and linux builds to Sandcastle allow-large-files Reviewed By: jknoxville Differential Revision: D8379581 fbshipit-source-id: 94c80fc91c69f43b7dc0c7eb8b2ee5ace4daf888
This commit is contained in:
committed by
Facebook Github Bot
parent
32382b2999
commit
50490b9435
17
.travis.yml
17
.travis.yml
@@ -15,14 +15,11 @@ matrix:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- yarn lint
|
- yarn lint
|
||||||
- yarn build macOnly build-number=$TRAVIS_BUILD_NUMBER
|
- yarn build --mac --version=$TRAVIS_BUILD_NUMBER
|
||||||
- cd website
|
- cd website
|
||||||
- yarn build
|
- yarn build
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
before_deploy:
|
|
||||||
- export SONAR_VERSION="v$(plutil -p $TRAVIS_BUILD_DIR/dist/mac/Sonar.app/Contents/Info.plist | awk '/CFBundleShortVersionString/ {print substr($3, 2, length($3)-2)}')"
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
- provider: pages
|
- provider: pages
|
||||||
skip-cleanup: true
|
skip-cleanup: true
|
||||||
@@ -32,17 +29,9 @@ matrix:
|
|||||||
keep-history: true
|
keep-history: true
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
- provider: releases
|
|
||||||
api_key: $GITHUB_TOKEN
|
|
||||||
file: dist/Sonar.zip
|
|
||||||
name: $SONAR_VERSION
|
|
||||||
draft: true
|
|
||||||
skip_cleanup: true
|
|
||||||
on:
|
|
||||||
branch: master
|
|
||||||
|
|
||||||
- language: objective-c
|
- language: objective-c
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- pod repo update
|
- pod repo update
|
||||||
|
|
||||||
@@ -53,4 +42,4 @@ matrix:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- cd iOS/Sample
|
- cd iOS/Sample
|
||||||
- xcodebuild clean build -workspace Sample.xcworkspace -scheme Pods-Sample
|
- xcodebuild clean build -workspace Sample.xcworkspace -scheme Pods-Sample
|
||||||
|
|||||||
@@ -51,11 +51,9 @@ yarn start
|
|||||||
## Building the desktop app
|
## Building the desktop app
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn build [macOnly] [build-number=$buildNumber]
|
yarn build --mac --version $buildNumber
|
||||||
```
|
```
|
||||||
|
|
||||||
A binary for macOS is created in `dist/mac`. `macOnly` and `build-number` are optional params.
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Find the full documentation for this project at [fbsonar.com](https://fbsonar.com/docs).
|
Find the full documentation for this project at [fbsonar.com](https://fbsonar.com/docs).
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"build": {
|
"build": {
|
||||||
"appId": "sonar",
|
"appId": "sonar",
|
||||||
"productName": "Sonar",
|
"productName": "Sonar",
|
||||||
"artifactName": "Sonar.${ext}",
|
"artifactName": "Sonar-${os}.${ext}",
|
||||||
"mac": {
|
"mac": {
|
||||||
"category": "public.app-category.developer-tools"
|
"category": "public.app-category.developer-tools"
|
||||||
},
|
},
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"7zip-bin-mac": "^1.0.1",
|
||||||
"babel-eslint": "^8.2.1",
|
"babel-eslint": "^8.2.1",
|
||||||
"electron": "^2.0.1",
|
"electron": "^2.0.1",
|
||||||
"electron-builder": "^19.49.0",
|
"electron-builder": "^19.49.0",
|
||||||
|
|||||||
@@ -52,14 +52,11 @@ function modifyPackageManifest(buildFolder) {
|
|||||||
manifest.dependencies = manifestStatic.dependencies;
|
manifest.dependencies = manifestStatic.dependencies;
|
||||||
manifest.main = 'index.js';
|
manifest.main = 'index.js';
|
||||||
|
|
||||||
const BUILD_NUMBER_ARG = 'build-number=';
|
const buildNumber = process.argv.join(' ').match(/--version=(\d+)/);
|
||||||
const buildNumber = (
|
if (buildNumber && buildNumber.length > 0) {
|
||||||
process.argv.find(arg => arg.startsWith(BUILD_NUMBER_ARG)) || ''
|
|
||||||
).replace(BUILD_NUMBER_ARG, '');
|
|
||||||
if (buildNumber) {
|
|
||||||
manifest.version = [
|
manifest.version = [
|
||||||
...manifest.version.split('.').slice(0, 2),
|
...manifest.version.split('.').slice(0, 2),
|
||||||
buildNumber,
|
buildNumber[1],
|
||||||
].join('.');
|
].join('.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,14 +77,18 @@ function modifyPackageManifest(buildFolder) {
|
|||||||
|
|
||||||
function buildDist(buildFolder) {
|
function buildDist(buildFolder) {
|
||||||
const targetsRaw = [];
|
const targetsRaw = [];
|
||||||
targetsRaw.push(Platform.MAC.createTarget(['zip']));
|
|
||||||
if (process.argv.slice(2).indexOf('macOnly') === -1) {
|
|
||||||
targetsRaw.push(Platform.LINUX.createTarget(['dir']));
|
|
||||||
targetsRaw.push(Platform.WINDOWS.createTarget(['dir']));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (process.argv.indexOf('--mac') > -1) {
|
||||||
|
targetsRaw.push(Platform.MAC.createTarget(['zip']));
|
||||||
|
}
|
||||||
|
if (process.argv.indexOf('--linux') > -1) {
|
||||||
|
targetsRaw.push(Platform.LINUX.createTarget(['zip']));
|
||||||
|
}
|
||||||
|
if (process.argv.indexOf('--win') > -1) {
|
||||||
|
targetsRaw.push(Platform.WINDOWS.createTarget(['zip']));
|
||||||
|
}
|
||||||
if (!targetsRaw.length) {
|
if (!targetsRaw.length) {
|
||||||
throw new Error('No targets specified. eg. --osx pkg,dmg --linux tar.gz');
|
throw new Error('No targets specified. eg. --mac, --win, or --linux');
|
||||||
}
|
}
|
||||||
|
|
||||||
// merge all target maps into a single map
|
// merge all target maps into a single map
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"7zip-bin-mac@^1.0.1":
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/7zip-bin-mac/-/7zip-bin-mac-1.0.1.tgz#3e68778bbf0926adc68159427074505d47555c02"
|
||||||
|
|
||||||
"7zip-bin@~3.0.0":
|
"7zip-bin@~3.0.0":
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-3.0.0.tgz#17416dc542f41511b26a9667b92847d75ef150fe"
|
resolved "https://registry.yarnpkg.com/7zip-bin/-/7zip-bin-3.0.0.tgz#17416dc542f41511b26a9667b92847d75ef150fe"
|
||||||
|
|||||||
Reference in New Issue
Block a user