Skip to content

Commit

Permalink
[skip mac][skip linux][skip arm-linux]
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdong262 committed Jun 19, 2024
1 parent 8a69588 commit c1deb1d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/win7-tar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
build:

runs-on: windows-2022
runs-on: windows-2019
environment: build
if: "!contains(github.event.head_commit.message, '[skip build]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip win]') && !contains(github.event.head_commit.message, '[skip win7-tar]')"

Expand Down
24 changes: 21 additions & 3 deletions build/bin/build-win7-tar.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
const { rm, echo } = require('shelljs')
const replace = require('replace-in-file')
const {
run,
writeSrc,
builder
} = require('./build-common')
const options = {
files: require('path').resolve(__dirname, '../../electron-builder.json'),
from: ['${productName}-${version}-${os}-${arch}.${ext}', ', "appx", "nsis"'], // eslint-disable-line
to: ['${productName}-${version}-${os}7.${ext}', ''] // eslint-disable-line
}
function replaceRun () {
return new Promise((resolve, reject) => {
replace(options, (err) => {
if (err) {
return reject(err)
}
console.log('start build win7 file')
resolve()
})
})
}

async function main () {
const pb = builder
echo('running build for win part 1')
echo('running build for win7')

echo('build tar.gz')
await replaceRun()
rm('-rf', 'dist')
writeSrc('win7-x64.tar.gz')
await run(`${pb} --win tar.gz`)
writeSrc('win7.tar.gz')
await run(`${pb} --win --ia32 tar.gz`)
}

main()

0 comments on commit c1deb1d

Please sign in to comment.