Skip to content

Commit c329903

Browse files
committed
chore: fix ci to update version
1 parent 06145ee commit c329903

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/create_release_branch.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ echo "Preparing release $VERSION"
55

66
# Update .csproj file
77
# This regex to update Version tag in .csproj file
8-
sed -i '' 's|<Version>\(.*\)</Version>|<Version>'"${VERSION}"'</Version>|g' src/stream-net.csproj
8+
# Detect OS and use appropriate sed syntax
9+
if [[ "$OSTYPE" == "darwin"* ]]; then
10+
# macOS/BSD sed
11+
sed -i '' 's|<Version>\(.*\)</Version>|<Version>'"${VERSION}"'</Version>|g' src/stream-net.csproj
12+
else
13+
# Linux/GNU sed
14+
sed -i 's|<Version>\(.*\)</Version>|<Version>'"${VERSION}"'</Version>|g' src/stream-net.csproj
15+
fi
916

1017

1118
# Create changelog

0 commit comments

Comments
 (0)