File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " openvr2ws-types" ,
3- "version" : " 2.9.1 " ,
3+ "version" : " 2.9.3 " ,
44 "description" : " TypeScript type definitions for the input and output of OpenVR2WS." ,
55 "type" : " module" ,
66 "types" : " types/index.d.ts" ,
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Get the new version number
4+ echo " New version (X.Y.Z): "
5+ read VERSION
6+
7+ # Check if the version number is in the correct format (X.X.X)
8+ if [[ ! $VERSION =~ ^[0-9]+\. [0-9]+\. [0-9]+$ ]]; then
9+ echo " Error: Version number must be in the format X.Y.Z"
10+ exit 1
11+ fi
12+
13+ # Update the version number in Resources.resx
14+ sed -i ' ' -e " s#<value>v[0-9]*\.[0-9]*\.[0-9]*</value>#<value>v$VERSION </value>#g" ./OpenVR2WS/Properties/Resources.resx
15+
16+ # Update the version number in package.json
17+ sed -i ' ' -e " s/\" version\" : \" [0-9]*\.[0-9]*\.[0-9]*\" /\" version\" : \" ${VERSION: 1} \" /g" ./OpenVR2WS/Types/dist/package.json
18+
19+ # Add the changes to git
20+ git add Resources.resx package.json
21+
22+ # Commit the changes with a message
23+ git commit -m " Update version to $VERSION "
24+
25+ # Create a git tag with the version number
26+ git tag $VERSION
27+
28+ # Push the changes and the tag to the remote repository
29+ git push origin main
30+ git push origin $VERSION
31+
32+ echo " Version updated to $VERSION and tag created."
You can’t perform that action at this time.
0 commit comments