Skip to content

Commit

Permalink
fix: parse stringsout of version for proper semver
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanzyTHEbar committed Mar 10, 2023
1 parent f755388 commit 0cb8dbf
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GUI/ETVR/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "etvr",
"version": "1.0.0-.3",
"version": "1.0.0",
"private": true,
"description": "A SolidJS project for EyeTrack VR",
"author": "EyeTrack VR",
Expand Down
2 changes: 1 addition & 1 deletion GUI/ETVR/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion GUI/ETVR/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "eyetrackvr"
version = "1.0.0-SolidJSGUI.2"
version = "1.0.0"
description = "Eye tracking for VR"
authors = ["DaOfficialWizard"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion GUI/ETVR/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "EyeTrackVR",
"version": "1.0.0-.3"
"version": "1.0.0"
},
"tauri": {
"allowlist": {
Expand Down
24 changes: 23 additions & 1 deletion repo-tools/scripts/prepareCMD.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,26 @@ jq --arg a "$nextReleaseVersion" '.package.version = $a' ./GUI/ETVR/src-tauri/ta
#
#sed -i "s/version = \"[0-9\\.]*\"/version = \"${nextReleaseVersion}\"/g" ./GUI/ETVR/src-tauri/Cargo.toml

printf "[prepareCMD.sh]: Done \n"
# Install the dependencies for toml file
printf "Install the dependencies for the toml file \n"

sudo apt install python3-pip
pip3 install yq

export PATH="~/.local/bin:$PATH"
source ~/.bashrc

tmp=$(mktemp)
tomlq -t --arg version "$nextReleaseVersion" '.package.version |= $version' ./GUI/ETVR/src-tauri/Cargo.toml > "$tmp" && mv "$tmp" ./GUI/ETVR/src-tauri/Cargo.toml -f

printf "[prepareCMD.sh]: Done \n"



# [package]
# name = "etvr"
# version = "0.1.0"

# q: can you modify the version parameter in a toml file that looks like the above?
# a: yes, you can use sed to modify the version parameter in a toml file that looks like the above
# the command is: sed -i "s/version = \"[0-9\\.]*\"/version = \"${nextReleaseVersion}\"/g" ./GUI/ETVR/src-tauri/Cargo.toml

0 comments on commit 0cb8dbf

Please sign in to comment.