Skip to content

Commit 3559c42

Browse files
committed
Fix version for types
1 parent b677948 commit 3559c42

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

Types/dist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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",

version.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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."

0 commit comments

Comments
 (0)