feat: implement analyzer and code fixer for identifying and fixing when a sync flag is not propagated correctly.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
version="${1:-}"
|
||||
csprojPath="${2:-src/StevanFreeborn.AsyncSyncFlagAnalyzer/StevanFreeborn.AsyncSyncFlagAnalyzer.csproj}"
|
||||
|
||||
if [[ -z "$version" ]]; then
|
||||
echo "Error: Version is required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
content=$(cat "$csprojPath")
|
||||
|
||||
if [[ "$content" =~ \<Version\>.*?\</Version\> ]]; then
|
||||
content=$(echo "$content" | sed "s|<Version>.*</Version>|<Version>$version</Version>|")
|
||||
elif [[ "$content" =~ \<PropertyGroup\> ]]; then
|
||||
content=$(echo "$content" | sed "s|<PropertyGroup>|<PropertyGroup>\\n <Version>$version</Version>|")
|
||||
fi
|
||||
|
||||
echo "$content" > "$csprojPath"
|
||||
Reference in New Issue
Block a user