Skip to content

Commit

Permalink
Test updating scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tanclary committed Oct 30, 2024
1 parent 2bd7938 commit dbe84a9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
# This is version for Calcite itself
# Note: it should not include "-SNAPSHOT" as it is automatically added by build.gradle.kts
# Release version can be generated by using -Prelease or -Prc=<int> arguments
calcite.version=1.36.10-looker
calcite.version=1.36.10-looker-tanner-test
# This is a version to be used from Maven repository. It can be overridden by localAvatica below
calcite.avatica.version=1.25.0

Expand Down
4 changes: 2 additions & 2 deletions looker-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ calcite.version=$NEXT_VERSION
echo -e " This becomes the new tip of the looker branch." >&2
echo -e "- Prior fixups, if any..." >&2
echo -e "- All commits from upstream..." >&2
echo -e "\nIf everything looks good, you can publish to Nexus with this command:\n" >&2
echo -e " ./gradlew -Prelease -PskipSign publishAllPublicationsToLookerNexusRepository\n" >&2
echo -e "\nIf everything looks good, you can publish to the Looker Artifact Registry with this command:\n" >&2
echo -e " ./looker-upload-artifact-registry.sh\n" >&2
echo -e "And you can push the release tag and force-push the looker branch to looker-open-source with these commands:\n" >&2
echo -e " git push git@github.com:looker-open-source/calcite.git $NEXT_TAG"
echo -e " git push -f git@github.com:looker-open-source/calcite.git $LOOKER_COMMIT:looker"
Expand Down
17 changes: 16 additions & 1 deletion looker-upload-artifact-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
# $2 is the artifact ID
# $3 is the version
function artifact_registry_upload {
local url=""
if [[ "$4" == "--snapshot" ]]; then
url="https://us-maven.pkg.dev/prow-build-looker/looker-maven-snapshots"
else
url="https://us-maven.pkg.dev/prow-build-looker/looker-maven-private"
fi
mvn deploy:deploy-file \
-DgroupId=org.apache.calcite \
-DartifactId="$2" \
Expand All @@ -29,15 +35,24 @@ function artifact_registry_upload {
-DgeneratePom=false \
-DpomFile="./$1/build/publications/$1/pom-default.xml" \
-DrepositoryId=artifact-registry \
-Durl=https://us-maven.pkg.dev/prow-build-looker/looker-maven-private
-Durl=$url
}

./gradlew build -x :redis:test && ./gradlew jar && ./gradlew generatePom && (
VERSION="$(sed -n 's/^calcite\.version=\([^ ]*\).*/\1/p' gradle.properties)"
if [[ "$1" == "--snapshot" ]]; then
artifact_registry_upload core calcite-core "$VERSION-SNAPSHOT" --snapshot
artifact_registry_upload babel calcite-babel "$VERSION-SNAPSHOT" --snapshot
artifact_registry_upload linq4j calcite-linq4j "$VERSION-SNAPSHOT" --snapshot
artifact_registry_upload testkit calcite-testkit "$VERSION-SNAPSHOT" --snapshot
echo
echo "Done uploading snapshot version ${VERSION}-SNAPSHOT to Looker Artifact Snapshot Registry!"
else
artifact_registry_upload core calcite-core "$VERSION"
artifact_registry_upload babel calcite-babel "$VERSION"
artifact_registry_upload linq4j calcite-linq4j "$VERSION"
artifact_registry_upload testkit calcite-testkit "$VERSION"
echo
echo "Done uploading version ${VERSION} to Looker Artifact Registry!"
fi
)

0 comments on commit dbe84a9

Please sign in to comment.