Skip to content

Commit c2892e2

Browse files
authored
node 12 ; osx fix (#488)
1 parent 97d72a1 commit c2892e2

File tree

5 files changed

+69
-129
lines changed

5 files changed

+69
-129
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ jobs:
1616
build:
1717
env:
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
1920
timeout-minutes: 40
2021
continue-on-error: false
2122
runs-on: ${{ matrix.os }}
2223
strategy:
23-
fail-fast: true
24+
fail-fast: false
2425
max-parallel: 3
2526
matrix:
2627
os: [ubuntu-latest, macos-latest, windows-latest]
@@ -29,7 +30,7 @@ jobs:
2930
shortsha: ${{ steps.ids.outputs.shortsha }}
3031
steps:
3132
- name: git checkout
32-
uses: actions/checkout@v2
33+
uses: actions/checkout@v4
3334
continue-on-error: false
3435

3536
- name: get tag & short-sha
@@ -46,9 +47,9 @@ jobs:
4647
continue-on-error: true
4748

4849
- name: setup node
49-
uses: actions/setup-node@v2
50+
uses: actions/setup-node@v4
5051
with:
51-
node-version: '11'
52+
node-version: '12'
5253
continue-on-error: false
5354

5455
# for debugging
@@ -67,7 +68,7 @@ jobs:
6768

6869
# build stuff
6970
- name: yarn install
70-
run: yarn install
71+
run: yarn install --immutable --immutable-cache --check-cache
7172

7273
- name: yarn gulp clean-release
7374
run: yarn gulp clean-release

gulp-appdmg.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
const alias = require('macos-alias');
2+
3+
const appdmg = require('appdmg');
4+
const through = require('through2');
5+
const gutil = require('gulp-util');
6+
7+
const PluginError = gutil.PluginError;
8+
const PLUGIN_NAME = 'gulp-appdmg';
9+
10+
module.exports = function(options) {
11+
const stream = through.obj(function(file, encoding, next) {
12+
next();
13+
}, function(callback) {
14+
const self = this;
15+
const ee = appdmg(options);
16+
17+
ee.on('progress', function(info) {
18+
gutil.log(`${info.current}/${info.total} ${info.type} ${info.title || info.status}`);
19+
});
20+
21+
ee.on('error', function(err) {
22+
self.emit('error', new PluginError(PLUGIN_NAME, err));
23+
callback();
24+
});
25+
26+
ee.on('finish', callback);
27+
});
28+
29+
// returning the file stream
30+
stream.resume();
31+
return stream;
32+
};

gulpfile.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ function dist_resources() {
285285
function apps(done) {
286286
var platforms = getPlatforms();
287287
removeItem(platforms, 'chromeos');
288+
removeItem(platforms, 'android');
288289

289290
buildNWAppsWrapper(platforms, 'normal', APPS_DIR, done);
290291
}
@@ -676,7 +677,9 @@ function release_osx64() {
676677
console.log('running locally - skipping signing of app');
677678
}
678679

679-
var appdmg = require('gulp-appdmg');
680+
//var appdmg = require('gulp-appdmg');
681+
const appdmg = require('./gulp-appdmg');
682+
680683

681684
// The appdmg does not generate the folder correctly, manually
682685
createDirIfNotExists(RELEASE_DIR);
@@ -697,14 +700,14 @@ function release_osx64() {
697700

698701
],
699702
background: path.join(__dirname, 'assets/osx/dmg-background.png'),
700-
format: 'UDBZ',
703+
format: 'UDZO',
701704
window: {
702705
size: {
703706
width: 755,
704707
height: 755
705708
}
706709
},
707-
'code-sign': { 'signing-identity': process.env.APP_IDENTITY }
710+
//'code-sign': { 'signing-identity': process.env.APP_IDENTITY }
708711
},
709712
})
710713
);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"yarn": "^1.22.15"
9494
},
9595
"optionalDependencies": {
96-
"gulp-appdmg": "^1.0.3"
96+
"appdmg": "^0.6.4",
97+
"macos-alias": "^0.2.11"
9798
}
9899
}

0 commit comments

Comments
 (0)