Skip to content

Commit

Permalink
Fix version for types
Browse files Browse the repository at this point in the history
  • Loading branch information
BOLL7708 committed Aug 24, 2024
1 parent b677948 commit 3559c42
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Types/dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openvr2ws-types",
"version": "2.9.1",
"version": "2.9.3",
"description": "TypeScript type definitions for the input and output of OpenVR2WS.",
"type": "module",
"types": "types/index.d.ts",
Expand Down
32 changes: 32 additions & 0 deletions version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Get the new version number
echo "New version (X.Y.Z): "
read VERSION

# Check if the version number is in the correct format (X.X.X)
if [[ ! $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Version number must be in the format X.Y.Z"
exit 1
fi

# Update the version number in Resources.resx
sed -i '' -e "s#<value>v[0-9]*\.[0-9]*\.[0-9]*</value>#<value>v$VERSION</value>#g" ./OpenVR2WS/Properties/Resources.resx

# Update the version number in package.json
sed -i '' -e "s/\"version\": \"[0-9]*\.[0-9]*\.[0-9]*\"/\"version\": \"${VERSION:1}\"/g" ./OpenVR2WS/Types/dist/package.json

# Add the changes to git
git add Resources.resx package.json

# Commit the changes with a message
git commit -m "Update version to $VERSION"

# Create a git tag with the version number
git tag $VERSION

# Push the changes and the tag to the remote repository
git push origin main
git push origin $VERSION

echo "Version updated to $VERSION and tag created."

0 comments on commit 3559c42

Please sign in to comment.