diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index 69e2a68..fd21a25 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -100,5 +100,5 @@ jobs: - name: Publish to sonatype run: ./gradlew publish - # - name: Close and release to maven - # run: ./gradlew closeAndReleaseRepository \ No newline at end of file + - name: Close and release to maven + run: ./gradlew closeAndReleaseRepository \ No newline at end of file diff --git a/scripts/update_android_gradle_version.sh b/scripts/update_android_gradle_version.sh index 97fc95f..a9083a3 100755 --- a/scripts/update_android_gradle_version.sh +++ b/scripts/update_android_gradle_version.sh @@ -1,8 +1,17 @@ +#!/bin/bash +set -e +set -x + PACKAGE_VERSION=$(cat ./package.json | jq -r '.version') echo "updating gradle version name to $PACKAGE_VERSION" # sed command works only on linux based systems as macOS version expects a backup file passed additionally + if [ "$(uname)" == "Darwin" ]; then - sed -i '' -e "/VERSION_NAME=/ s/=.*/=$PACKAGE_VERSION/" ./gradle.properties + ARGS=('') else - sed -i -e "/VERSION_NAME=/ s/=.*/=$PACKAGE_VERSION/" ./gradle.properties -fi \ No newline at end of file + ARGS=() +fi + +sed -i "${ARGS[@]}" -e "/VERSION_NAME=/ s/=.*/=$PACKAGE_VERSION/" ./gradle.properties +sed -i "${ARGS[@]}" -e '// s/>.*/>'"$PACKAGE_VERSION"'<\/version>/' ./README.md +sed -i "${ARGS[@]}" -e '/implementation/ s/livekit-server:.*/livekit-server:'"$PACKAGE_VERSION'/" ./README.md \ No newline at end of file