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 { MakerZIP } from '@electron-forge/maker-zip'
|
||||
import { PublisherGithub } from '@electron-forge/publisher-github'
|
||||
|
@ -49,6 +49,11 @@ const config: ForgeConfig = {
|
|||
prerelease: true,
|
||||
}),
|
||||
],
|
||||
hooks: {
|
||||
readPackageJson: async (_, packageJson) => {
|
||||
return { ...packageJson, version: process.env.VERSION || packageJson.version }
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new AutoUnpackNativesPlugin({}),
|
||||
new WebpackPlugin({
|
||||
|
|
Loading…
Reference in a new issue