mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-07-14 09:58:46 +00:00
Gitlab CI Testing
This commit is contained in:
parent
95704c38f1
commit
62dc08bf3e
2 changed files with 23 additions and 16 deletions
|
@ -12,14 +12,15 @@ buildMac:
|
||||||
- npm run make -- --platform="darwin" --arch="x64"
|
- npm run make -- --platform="darwin" --arch="x64"
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
buildLinux:
|
buildWindowsAndLinux:
|
||||||
image: node:latest
|
image: node:latest
|
||||||
stage: buildAndDeployElectron
|
stage: buildAndDeployElectron
|
||||||
tags:
|
tags:
|
||||||
- fcast
|
- fcast
|
||||||
before_script:
|
before_script:
|
||||||
- cd receivers/electron
|
- cd receivers/electron
|
||||||
- apt update && apt install -y wine rpm p7zip-full unzip
|
- apt update && apt install -y dpkg fakeroot rpm
|
||||||
|
#wine p7zip-full unzip
|
||||||
- export WINEPATH="/root/wix314-binaries/"
|
- export WINEPATH="/root/wix314-binaries/"
|
||||||
script:
|
script:
|
||||||
- npm install
|
- npm install
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const yargs = require('yargs/yargs');
|
const yargs = require('yargs/yargs');
|
||||||
const { hideBin } = require('yargs/helpers');
|
const { hideBin } = require('yargs/helpers');
|
||||||
|
const extract = require('extract-zip')
|
||||||
|
|
||||||
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
|
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
|
||||||
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
|
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
|
||||||
|
@ -71,18 +72,18 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Same as '@electron-forge/maker-wix', except linux compatible
|
// Same as '@electron-forge/maker-wix', except linux compatible
|
||||||
{
|
// {
|
||||||
name: '@futo/forge-maker-wix-linux',
|
// name: '@futo/forge-maker-wix-linux',
|
||||||
config: {
|
// config: {
|
||||||
arch: 'x64',
|
// arch: 'x64',
|
||||||
appUserModelId: `org.futo.${APPLICATION_NAME}`,
|
// appUserModelId: `org.futo.${APPLICATION_NAME}`,
|
||||||
// signing TBD
|
// // signing TBD
|
||||||
icon: './assets/icons/icon.ico',
|
// icon: './assets/icons/icon.ico',
|
||||||
name: APPLICATION_TITLE,
|
// name: APPLICATION_TITLE,
|
||||||
programFilesFolderName: APPLICATION_TITLE,
|
// programFilesFolderName: APPLICATION_TITLE,
|
||||||
shortcutName: APPLICATION_TITLE,
|
// shortcutName: APPLICATION_TITLE,
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: '@electron-forge/maker-zip',
|
name: '@electron-forge/maker-zip',
|
||||||
config: {}
|
config: {}
|
||||||
|
@ -90,7 +91,7 @@ module.exports = {
|
||||||
],
|
],
|
||||||
hooks: {
|
hooks: {
|
||||||
postMake: async (forgeConfig, makeResults) => {
|
postMake: async (forgeConfig, makeResults) => {
|
||||||
makeResults.forEach(e => {
|
for (const e of makeResults) {
|
||||||
// Standardize artifact output naming
|
// Standardize artifact output naming
|
||||||
switch (e.platform) {
|
switch (e.platform) {
|
||||||
case "win32": {
|
case "win32": {
|
||||||
|
@ -122,6 +123,10 @@ module.exports = {
|
||||||
case "linux": {
|
case "linux": {
|
||||||
let artifactName = `${APPLICATION_NAME}-linux-${e.arch}-${e.packageJSON.version}.zip`;
|
let artifactName = `${APPLICATION_NAME}-linux-${e.arch}-${e.packageJSON.version}.zip`;
|
||||||
if (fs.existsSync(`./out/make/zip/linux/${e.arch}/${artifactName}`)) {
|
if (fs.existsSync(`./out/make/zip/linux/${e.arch}/${artifactName}`)) {
|
||||||
|
// note regarding ubuntu issue
|
||||||
|
// await extract(`./out/make/zip/linux/${e.arch}/${artifactName}`, { dir: `${process.cwd()}/out/make/zip/linux/${e.arch}/` });
|
||||||
|
// fs.chownSync(`${process.cwd()}/out/make/zip/linux/${e.arch}/${APPLICATION_NAME}-linux-${e.arch}/chrome-sandbox`, 0, 0);
|
||||||
|
// fs.chmodSync(`${process.cwd()}/out/make/zip/linux/${e.arch}/${APPLICATION_NAME}-linux-${e.arch}/chrome-sandbox`, 4755);
|
||||||
fs.renameSync(`./out/make/zip/linux/${e.arch}/${artifactName}`, `./out/make/zip/linux/${e.arch}/${APPLICATION_NAME}-${e.packageJSON.version}-linux-${e.arch}.zip`);
|
fs.renameSync(`./out/make/zip/linux/${e.arch}/${artifactName}`, `./out/make/zip/linux/${e.arch}/${APPLICATION_NAME}-${e.packageJSON.version}-linux-${e.arch}.zip`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +155,7 @@ module.exports = {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -168,6 +173,7 @@ module.exports = {
|
||||||
[FuseV1Options.EnableNodeCliInspectArguments]: false,
|
[FuseV1Options.EnableNodeCliInspectArguments]: false,
|
||||||
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
|
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
|
||||||
[FuseV1Options.OnlyLoadAppFromAsar]: true,
|
[FuseV1Options.OnlyLoadAppFromAsar]: true,
|
||||||
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue