write version at build time
This commit is contained in:
parent
962d351281
commit
7406881eeb
1 changed files with 6 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
import type { ForgeConfig } from '@electron-forge/shared-types'
|
import type { ForgeConfig, ResolvedForgeConfig, ForgeMakeResult } from '@electron-forge/shared-types'
|
||||||
import { MakerSquirrel } from '@electron-forge/maker-squirrel'
|
import { MakerSquirrel } from '@electron-forge/maker-squirrel'
|
||||||
import { MakerZIP } from '@electron-forge/maker-zip'
|
import { MakerZIP } from '@electron-forge/maker-zip'
|
||||||
import { PublisherGithub } from '@electron-forge/publisher-github'
|
import { PublisherGithub } from '@electron-forge/publisher-github'
|
||||||
|
@ -49,6 +49,11 @@ const config: ForgeConfig = {
|
||||||
prerelease: true,
|
prerelease: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
hooks: {
|
||||||
|
readPackageJson: async (_, packageJson) => {
|
||||||
|
return { ...packageJson, version: process.env.VERSION || packageJson.version }
|
||||||
|
},
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new AutoUnpackNativesPlugin({}),
|
new AutoUnpackNativesPlugin({}),
|
||||||
new WebpackPlugin({
|
new WebpackPlugin({
|
||||||
|
|
Loading…
Reference in a new issue