File tree Expand file tree Collapse file tree 3 files changed +3
-41
lines changed Expand file tree Collapse file tree 3 files changed +3
-41
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " serial-monitor-rust"
3
- version = " 0.3.3 "
3
+ version = " 0.3.2 "
4
4
edition = " 2021"
5
5
authors = [" Linus Leo Stöckli" ]
6
6
description = " Serial Monitor and Plotter written in rust."
@@ -36,11 +36,9 @@ regex = "1.11"
36
36
name = " Serial Monitor"
37
37
identifier = " com.hacknus.serial_monitor"
38
38
icon = [" ./icons/install.png" ]
39
- version = " 0.3.3"
40
39
copyright = " Copyright (c) hacknus 2025. All rights reserved."
41
40
category = " Developer Tool"
42
41
short_description = " Serial Monitor and Plotter written in rust."
43
- license = " GPL-3.0"
44
42
osx_minimum_system_version = " 10.8"
45
43
osx_url_schemes = [" com.hacknus.serial_monitor" ]
46
44
@@ -49,5 +47,4 @@ dbg-build = false
49
47
dbg-name = false
50
48
name = " Serial Monitor"
51
49
no-build = false
52
- output = " target/wix/SerialMonitorInstaller.msi"
53
- version = " 0.3.3"
50
+ output = " target/wix/SerialMonitorInstaller.msi"
Original file line number Diff line number Diff line change 1
- use std:: fs;
2
1
fn main ( ) {
3
2
println ! ( "cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.8" ) ;
4
-
5
- // Get the package version from the environment variable
6
- let version = env ! ( "CARGO_PKG_VERSION" ) ;
7
-
8
- // Define the paths to `Cargo.toml`
9
- let cargo_toml_path = "Cargo.toml" ;
10
-
11
- // Read `Cargo.toml`
12
- let content = fs:: read_to_string ( cargo_toml_path) . expect ( "Failed to read Cargo.toml" ) ;
13
-
14
- // Replace `version = ...` only within `[package.metadata.bundle]` and `[package.metadata.wix]`
15
- let updated_content = content
16
- . lines ( )
17
- . map ( |line| {
18
- if line. trim_start ( ) . starts_with ( "version =" ) {
19
- // Check if we're inside the relevant sections
20
- if content. contains ( "[package.metadata.bundle]" )
21
- || content. contains ( "[package.metadata.wix]" )
22
- {
23
- format ! ( r#"version = "{}""# , version)
24
- } else {
25
- line. to_string ( )
26
- }
27
- } else {
28
- line. to_string ( )
29
- }
30
- } )
31
- . collect :: < Vec < _ > > ( )
32
- . join ( "\n " ) ;
33
-
34
- // Write the updated content back to `Cargo.toml`
35
- fs:: write ( cargo_toml_path, updated_content) . expect ( "Failed to write updated Cargo.toml" ) ;
36
-
37
- println ! ( "cargo:rerun-if-changed={}" , cargo_toml_path) ;
38
3
}
You can’t perform that action at this time.
0 commit comments