Skip to content

Commit

Permalink
Merge pull request #20 from TelemetryDeck/fix-version-not-updating
Browse files Browse the repository at this point in the history
Fix: reported SDK version should match actual dart package version
  • Loading branch information
kkostov authored Aug 2, 2024
2 parents 835f3d8 + eddc37a commit 8d6f9f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ echo "Updating package versions to ${NEW_VERSION}."

if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS requires an empty string argument after -i to edit in place without backup
sed -i '' "s/^const String telemetryClientVersion = .*$/const String telemetryClientVersion = \"${NEW_VERSION}\";/g" "lib/versions.dart"
sed -i '' "s/^const String telemetryClientVersion = .*$/const String telemetryClientVersion = \"${NEW_VERSION}\";/g" "lib/src/versions.dart"
sed -i '' "s/^version: .*/version: ${NEW_VERSION}/g" "pubspec.yaml"
else
# Linux
sed -i "/const String telemetryClientVersion =/c\const String telemetryClientVersion = \"${NEW_VERSION}\";" "lib/versions.dart"
sed -i "/const String telemetryClientVersion =/c\const String telemetryClientVersion = \"${NEW_VERSION}\";" "lib/src/versions.dart"
sed -i "s/^version: .*/version: ${NEW_VERSION}/g" "pubspec.yaml"
fi

Expand Down

0 comments on commit 8d6f9f3

Please sign in to comment.