Skip to content

Commit

Permalink
node 12 ; osx fix (#488)
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdCopter authored Dec 1, 2023
1 parent 97d72a1 commit c2892e2
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 129 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
timeout-minutes: 40
continue-on-error: false
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
max-parallel: 3
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -29,7 +30,7 @@ jobs:
shortsha: ${{ steps.ids.outputs.shortsha }}
steps:
- name: git checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
continue-on-error: false

- name: get tag & short-sha
Expand All @@ -46,9 +47,9 @@ jobs:
continue-on-error: true

- name: setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '11'
node-version: '12'
continue-on-error: false

# for debugging
Expand All @@ -67,7 +68,7 @@ jobs:

# build stuff
- name: yarn install
run: yarn install
run: yarn install --immutable --immutable-cache --check-cache

- name: yarn gulp clean-release
run: yarn gulp clean-release
Expand Down
32 changes: 32 additions & 0 deletions gulp-appdmg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const alias = require('macos-alias');

const appdmg = require('appdmg');
const through = require('through2');
const gutil = require('gulp-util');

const PluginError = gutil.PluginError;
const PLUGIN_NAME = 'gulp-appdmg';

module.exports = function(options) {
const stream = through.obj(function(file, encoding, next) {
next();
}, function(callback) {
const self = this;
const ee = appdmg(options);

ee.on('progress', function(info) {
gutil.log(`${info.current}/${info.total} ${info.type} ${info.title || info.status}`);
});

ee.on('error', function(err) {
self.emit('error', new PluginError(PLUGIN_NAME, err));
callback();
});

ee.on('finish', callback);
});

// returning the file stream
stream.resume();
return stream;
};
9 changes: 6 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ function dist_resources() {
function apps(done) {
var platforms = getPlatforms();
removeItem(platforms, 'chromeos');
removeItem(platforms, 'android');

buildNWAppsWrapper(platforms, 'normal', APPS_DIR, done);
}
Expand Down Expand Up @@ -676,7 +677,9 @@ function release_osx64() {
console.log('running locally - skipping signing of app');
}

var appdmg = require('gulp-appdmg');
//var appdmg = require('gulp-appdmg');
const appdmg = require('./gulp-appdmg');


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

],
background: path.join(__dirname, 'assets/osx/dmg-background.png'),
format: 'UDBZ',
format: 'UDZO',
window: {
size: {
width: 755,
height: 755
}
},
'code-sign': { 'signing-identity': process.env.APP_IDENTITY }
//'code-sign': { 'signing-identity': process.env.APP_IDENTITY }
},
})
);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"yarn": "^1.22.15"
},
"optionalDependencies": {
"gulp-appdmg": "^1.0.3"
"appdmg": "^0.6.4",
"macos-alias": "^0.2.11"
}
}
Loading

0 comments on commit c2892e2

Please sign in to comment.