-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v0.4.0' of https://github.com/nwittwer/shift into brows…
…ersync
- Loading branch information
Showing
39 changed files
with
12,096 additions
and
362 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
GITHUB_TOKEN=xxx | ||
MAC_CERT_ID=xxxxxxxxxx |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ module.exports = { | |
SRC: 'src/', | ||
DIST: 'dist/', | ||
SHIP: 'ship/', | ||
TEST: 'test/', | ||
|
||
SERVER: { | ||
PORT: 8000 | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Update process.env based on .env file (in root directory) | ||
require('dotenv').config(); | ||
|
||
const gulp = require('gulp'); | ||
const exec = require('child_process').exec; | ||
|
||
const APP_NAME = "Shift"; // @TODO: un-hardcode this value | ||
const MAC_CERTIFICATE = process.env.MAC_CERT_ID; // Mac certificate ID (xxxxxxxxxx) | ||
|
||
function sign(callback) { | ||
const command = ` | ||
# Go into the ship folder | ||
cd ship/${APP_NAME}/osx64/ | ||
# Code sign your app using the variables above | ||
codesign --force --deep --verbose --sign "${MAC_CERTIFICATE}" ${APP_NAME}.app | ||
`; | ||
|
||
exec(command, (err, stdout, stderr) => { | ||
console.log(stdout); | ||
console.log(stderr); | ||
callback(err); | ||
}); | ||
} | ||
|
||
function validate(callback) { | ||
const command = ` | ||
cd ship/${APP_NAME}/osx64/ | ||
codesign --verify -vvvv ${APP_NAME}.app & spctl -a -vvvv ${APP_NAME}.app | ||
`; | ||
|
||
exec(command, (err, stdout, stderr) => { | ||
console.log(stdout); | ||
console.log(stderr); | ||
callback(err); | ||
}); | ||
} | ||
|
||
gulp.task('code-sign-mac', gulp.series(sign, validate)); |
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
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
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
Oops, something went wrong.