|
15 | 15 | python scripts/bump_installer.py # version bump only |
16 | 16 | python scripts/bump_installer.py --sync-files # bump + re-sync APPDIR |
17 | 17 | python scripts/bump_installer.py --sync-only # re-sync APPDIR only (CI) |
| 18 | + python scripts/bump_installer.py --sync-only --dev # CI dev build (renames MSI) |
18 | 19 | python scripts/bump_installer.py --version 0.7.0 # explicit version override |
19 | 20 |
|
20 | 21 | The version-bump path rewrites ProductVersion / ProductCode / PackageFileName. |
|
25 | 26 | is already at the release version and we just want the file list to match |
26 | 27 | CI's pyinstaller output (rather than the developer's local one). |
27 | 28 |
|
| 29 | +--dev (CI-only, combined with --sync-only) additionally rewrites the MSI |
| 30 | +PackageFileName to PySceneDetect-{ver}-dev-win64.msi so dev-build artifacts |
| 31 | +can't be confused with release artifacts. ProductVersion and ProductCode |
| 32 | +stay untouched - those have to remain stable for upgrade-chain integrity. |
| 33 | +
|
28 | 34 | All paths shell out to AdvancedInstaller.com so the .aip's invariants |
29 | 35 | (line endings, attribute ordering, GUID casing) stay intact. The CLI lives |
30 | 36 | under "C:\\Program Files (x86)\\Caphyon\\Advanced Installer ..\\bin\\x86\\". |
@@ -109,19 +115,35 @@ def main() -> None: |
109 | 115 | action="store_true", |
110 | 116 | help="Re-sync APPDIR only; leave version/GUID fields untouched (CI use).", |
111 | 117 | ) |
| 118 | + parser.add_argument( |
| 119 | + "--dev", |
| 120 | + action="store_true", |
| 121 | + help=( |
| 122 | + "Rename the MSI to PySceneDetect-{ver}-dev-win64.msi so dev-build artifacts " |
| 123 | + "are distinguishable from release artifacts. Only valid with --sync-only." |
| 124 | + ), |
| 125 | + ) |
112 | 126 | parser.add_argument( |
113 | 127 | "--version", |
114 | 128 | dest="version_override", |
115 | 129 | help="MSI version override (default: derived from scenedetect.__version__).", |
116 | 130 | ) |
117 | 131 | args = parser.parse_args() |
118 | 132 |
|
| 133 | + if args.dev and not args.sync_only: |
| 134 | + sys.exit("--dev is only valid in combination with --sync-only.") |
| 135 | + |
119 | 136 | advinst = find_advinst() |
120 | 137 | print(f"Using {advinst}") |
121 | 138 |
|
122 | 139 | if args.sync_only: |
123 | 140 | print(f"Re-syncing APPDIR in {INSTALLER_AIP.name}") |
124 | 141 | resync_appdir(advinst) |
| 142 | + if args.dev: |
| 143 | + version = msi_version(args.version_override or scenedetect.__version__) |
| 144 | + dev_name = f"PySceneDetect-{version}-dev-win64.msi" |
| 145 | + print(f"Renaming MSI package to {dev_name} (dev build)") |
| 146 | + run(advinst, "/SetPackageName", dev_name, "-buildname", "DefaultBuild") |
125 | 147 | return |
126 | 148 |
|
127 | 149 | raw_version = args.version_override or scenedetect.__version__ |
|
0 commit comments