diff --git a/Types/dist/package.json b/Types/dist/package.json index 18dcc7d..e579f92 100644 --- a/Types/dist/package.json +++ b/Types/dist/package.json @@ -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", diff --git a/version.sh b/version.sh new file mode 100644 index 0000000..5b2313e --- /dev/null +++ b/version.sh @@ -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#v[0-9]*\.[0-9]*\.[0-9]*#v$VERSION#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." \ No newline at end of file