@@ -10,15 +10,28 @@ keep the `tauri-release` crate version without the `beta` or `beta-rc` suffix.
1010
1111const { readFileSync, writeFileSync } = require ( "fs" )
1212
13- const runtimeManifestPath = '../../core/tauri-runtime/Cargo.toml'
14- const dependencyManifestPaths = [ '../../core/tauri/Cargo.toml' ]
15- const changelogPath = '../../core/tauri-runtime/CHANGELOG.md'
13+ const packageNickname = process . argv [ 2 ]
14+ const bump = process . argv [ 3 ]
1615
17- const bump = process . argv [ 2 ]
16+ let manifestPath
17+ let dependencyManifestPaths
18+ let changelogPath
1819
19- let runtimeManifest = readFileSync ( runtimeManifestPath , "utf-8" )
20- runtimeManifest = runtimeManifest . replace ( / v e r s i o n = " ( \d + \. \d + \. \d + ) - [ ^ 0 - 9 \. ] + \. 0 " / , 'version = "$1"' )
21- writeFileSync ( runtimeManifestPath , runtimeManifest )
20+ if ( packageNickname === 'tauri-runtime' ) {
21+ manifestPath = '../../core/tauri-runtime/Cargo.toml'
22+ dependencyManifestPaths = [ '../../core/tauri/Cargo.toml' , '../../core/tauri-runtime-wry/Cargo.toml' ]
23+ changelogPath = '../../core/tauri-runtime/CHANGELOG.md'
24+ } else if ( packageNickname === 'tauri-runtime-wry' ) {
25+ manifestPath = '../../core/tauri-runtime-wry/Cargo.toml'
26+ dependencyManifestPaths = [ '../../core/tauri/Cargo.toml' ]
27+ changelogPath = '../../core/tauri-runtime-wry/CHANGELOG.md'
28+ } else {
29+ throw new Error ( `Unexpected package ${ packageNickname } ` )
30+ }
31+
32+ let manifest = readFileSync ( manifestPath , "utf-8" )
33+ manifest = manifest . replace ( / v e r s i o n = " ( \d + \. \d + \. \d + ) - [ ^ 0 - 9 \. ] + \. 0 " / , 'version = "$1"' )
34+ writeFileSync ( manifestPath , manifest )
2235
2336let changelog = readFileSync ( changelogPath , "utf-8" )
2437changelog = changelog . replace ( / ( \d + \. \d + \. \d + ) - [ ^ 0 - 9 \. ] + \. 0 / , '$1' )
0 commit comments