Skip to content

Commit

Permalink
write version at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Morgan authored and jmorganca committed Jul 7, 2023
1 parent 962d351 commit 7406881
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/forge.config.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit 7406881

Please sign in to comment.