Skip to content

Commit 4e13e85

Browse files
committed
chore: Update sed script so it should pass on ubuntu as well
1 parent 0a905d4 commit 4e13e85

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/dsl-java/install-connector.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,10 @@ cp "$CONNECTOR_PROTO_LOCATION/proto/contract_case_stream.proto" src/main/proto
1616
cp "$CONNECTOR_LOCATION/package/"* "$INSTALL_LOCATION"
1717

1818
# Update the caseCoreVersion (may be a no-op)
19+
#
20+
# The regular expression matches semver:
21+
# - `[0-9]+\.[0-9]+\.[0-9]+` : The basic major.minor.patch version
22+
# - `(-[0-9A-Za-z\.-]+)?` : Optional pre-release version
23+
# - `(\+[0-9A-Za-z\.-]+)?` : Optional build metadata
1924
CORE_VERSION_NUMBER=$(jq -r .version "$SCRIPT_DIR/../case-core/package.json")
20-
sed -i '' -E 's/def caseCoreVersion = "([0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+)?(\+[0-9A-Za-z-]+)?)?"/def caseCoreVersion = "'$CORE_VERSION_NUMBER'"/' build.gradle
25+
sed -E 's/def caseCoreVersion = "([0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z\.-]+)?(\+[0-9A-Za-z\.-]+)?)?"/def caseCoreVersion = "'$CORE_VERSION_NUMBER'"/' "$SCRIPT_DIR/build.gradle" > "$SCRIPT_DIR/build.gradle.tmp" && mv "$SCRIPT_DIR/build.gradle.tmp" "$SCRIPT_DIR/build.gradle"

0 commit comments

Comments
 (0)