You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by lr...@apache.org on 2026/09/16 08:59:59 UTC
(incubator-toree) branch master updated (e74c5b97 -> 82340a9c)
This is an automated email from the ASF dual-hosted git repository.
lresende pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git
from e74c5b97 Add license and description to assembly POM (#257)
new 29e03a61 Read the GPG passphrase from MAVEN_GPG_PASSPHRASE in Makefile
new 5d8e4cf2 Refactor release script to separate prepare from publish
new 87c8f51a Allow a release to be prepared from another repository
new 608feabe Fix pip artifact names to include incubating suffix
new 82340a9c Add missing ASF license header to dependabot.yml
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/dependabot.yml | 17 +++
Makefile | 42 ++++---
RELEASE_NOTES.md | 3 +
build.sbt | 2 +-
etc/tools/release-build.sh | 286 ++++++++++++++++++++++++++++++---------------
etc/tools/sign-file | 4 +-
6 files changed, 239 insertions(+), 115 deletions(-)
(incubator-toree) 04/05: Fix pip artifact names to include incubating suffix
Posted by lr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lresende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git
commit 608feabea2ab7f427c5801113b3346b95fbc98bd
Author: Luciano Resende <lr...@apple.com>
AuthorDate: Sun Sep 13 13:44:27 2026 +0200
Fix pip artifact names to include incubating suffix
According to Apache Incubator policy, all release artifacts must include
the `-incubating` suffix in their file names. The pip packages for toree
and apache-toree were previously missing this suffix.
Update the Makefile to rename the generated tarballs from the setup.py
sdist to include the suffix. Update the release validation script to
expect the new filenames.
---
Makefile | 34 +++++++++++++++++++---------------
etc/tools/release-build.sh | 4 ++--
2 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/Makefile b/Makefile
index e4a878d3..f4fea93f 100644
--- a/Makefile
+++ b/Makefile
@@ -199,7 +199,7 @@ dev: dist .toree-dev-image
bash -c "jupyter lab --debug --ip=* --no-browser"
define JUPYTER_COMMAND
-pip install toree-$(BASE_VERSION).tar.gz
+pip install toree-$(VERSION).tar.gz
jupyter toree install --interpreters=Scala,SQL
cd /srv/toree/etc/examples/notebooks
jupyter lab --debug --ip=* --no-browser
@@ -242,8 +242,8 @@ publish-jars:
################################################################################
# PIP PACKAGE
################################################################################
-dist/toree-pip/toree-$(BASE_VERSION).tar.gz: DOCKER_WORKDIR=/srv/toree/dist/toree-pip
-dist/toree-pip/toree-$(BASE_VERSION).tar.gz: dist/toree
+dist/toree-pip/toree-$(VERSION).tar.gz: DOCKER_WORKDIR=/srv/toree/dist/toree-pip
+dist/toree-pip/toree-$(VERSION).tar.gz: dist/toree
@mkdir -p dist/toree-pip
@cp -r dist/toree dist/toree-pip
@cp dist/toree/LICENSE dist/toree-pip/LICENSE
@@ -256,10 +256,12 @@ dist/toree-pip/toree-$(BASE_VERSION).tar.gz: dist/toree
printf "__version__ = '$(BASE_VERSION)'\n" >> dist/toree-pip/toree/_version.py
printf "__commit__ = '$(COMMIT)'\n" >> dist/toree-pip/toree/_version.py
@$(DOCKER) --user=root $(IMAGE) python setup.py sdist --dist-dir=.
- @$(DOCKER) -p 8888:8888 --user=root $(IMAGE) bash -c 'pip install toree-$(BASE_VERSION).tar.gz && jupyter toree install'
+ @mv dist/toree-pip/toree-$(BASE_VERSION).tar.gz dist/toree-pip/toree-$(VERSION).tar.gz
-dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz: DOCKER_WORKDIR=/srv/toree/dist/apache-toree-pip
-dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz: dist/toree
+ @$(DOCKER) -p 8888:8888 --user=root $(IMAGE) bash -c 'pip install toree-$(VERSION).tar.gz && jupyter toree install'
+
+dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz: DOCKER_WORKDIR=/srv/toree/dist/apache-toree-pip
+dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz: dist/toree
@mkdir -p dist/apache-toree-pip
@cp -r dist/toree dist/apache-toree-pip
@cp dist/toree/LICENSE dist/apache-toree-pip/LICENSE
@@ -273,18 +275,20 @@ dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz: dist/toree
@printf "__commit__ = '$(COMMIT)'\n" >> dist/apache-toree-pip/toree/_version.py
@sed -i -e "s#name='toree'#name='apache-toree'#g" dist/apache-toree-pip/setup.py
@$(DOCKER) --user=root $(IMAGE) python setup.py sdist --dist-dir=.
- @$(DOCKER) -p 8888:8888 --user=root $(IMAGE) bash -c 'pip install apache-toree-$(BASE_VERSION).tar.gz && jupyter toree install'
+ @mv dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz
+
+ @$(DOCKER) -p 8888:8888 --user=root $(IMAGE) bash -c 'pip install apache-toree-$(VERSION).tar.gz && jupyter toree install'
-pip-release: dist/toree-pip/toree-$(BASE_VERSION).tar.gz dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
+pip-release: dist/toree-pip/toree-$(VERSION).tar.gz dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz
-dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512: dist/toree-pip/toree-$(BASE_VERSION).tar.gz
- @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/toree-pip/toree-$(BASE_VERSION).tar.gz
+dist/toree-pip/toree-$(VERSION).tar.gz.asc dist/toree-pip/toree-$(VERSION).tar.gz.sha512: dist/toree-pip/toree-$(VERSION).tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/toree-pip/toree-$(VERSION).tar.gz
-dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.asc dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.sha512: dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
- @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
+dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz.asc dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz.sha512: dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz
-sign-pip: dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512 dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.asc dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.sha512
+sign-pip: dist/toree-pip/toree-$(VERSION).tar.gz.asc dist/toree-pip/toree-$(VERSION).tar.gz.sha512 dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz.asc dist/apache-toree-pip/apache-toree-$(VERSION).tar.gz.sha512
publish-pip: PYPI_REPO?=https://pypi.python.org/pypi
publish-pip: PYPI_USER?=
@@ -297,14 +301,14 @@ publish-pip: sign-pip
-v `pwd`:/srv/toree $(DOCKER_ARGS) \
$(IMAGE) bash -c '$(PYPIRC) pip install twine && \
python setup.py register -r $(PYPI_REPO) && \
- twine upload -r pypi toree-$(BASE_VERSION).tar.gz toree-$(BASE_VERSION).tar.gz.asc'
+ twine upload -r pypi toree-$(VERSION).tar.gz toree-$(VERSION).tar.gz.asc'
@docker run -t --rm \
--workdir /srv/toree/dist/apache-toree-pip \
-e PYTHONPATH='/srv/toree' \
-v `pwd`:/srv/toree $(DOCKER_ARGS) \
$(IMAGE) bash -c '$(PYPIRC) pip install twine && \
python setup.py register -r $(PYPI_REPO) && \
- twine upload -r pypi apache-toree-$(BASE_VERSION).tar.gz apache-toree-$(BASE_VERSION).tar.gz.asc'
+ twine upload -r pypi apache-toree-$(VERSION).tar.gz apache-toree-$(VERSION).tar.gz.asc'
################################################################################
# BIN PACKAGE
diff --git a/etc/tools/release-build.sh b/etc/tools/release-build.sh
index 8245d68c..ddaadc7d 100755
--- a/etc/tools/release-build.sh
+++ b/etc/tools/release-build.sh
@@ -277,8 +277,8 @@ function validate_artifacts {
local artifacts=(
"target/toree/dist/apache-toree-bin/apache-toree-$FULL_RELEASE_VERSION-bin.tar.gz"
"target/toree/dist/apache-toree-src/apache-toree-$FULL_RELEASE_VERSION-src.tar.gz"
- "target/toree/dist/toree-pip/toree-$RELEASE_VERSION.tar.gz"
- "target/toree/dist/apache-toree-pip/apache-toree-$RELEASE_VERSION.tar.gz"
+ "target/toree/dist/toree-pip/toree-$FULL_RELEASE_VERSION.tar.gz"
+ "target/toree/dist/apache-toree-pip/apache-toree-$FULL_RELEASE_VERSION.tar.gz"
"target/toree/dist/toree/lib/toree-assembly-$FULL_RELEASE_VERSION.jar"
"target/toree/dist/toree/toree-assembly-$FULL_RELEASE_VERSION.pom"
)
(incubator-toree) 01/05: Read the GPG passphrase from MAVEN_GPG_PASSPHRASE in Makefile
Posted by lr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lresende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git
commit 29e03a613542539bc8106c090d4b8159c826a8c7
Author: Luciano Resende <lr...@apple.com>
AuthorDate: Sat Sep 12 23:12:38 2026 +0200
Read the GPG passphrase from MAVEN_GPG_PASSPHRASE in Makefile
The release tooling used two names for one secret. release-build.sh collects
the passphrase into MAVEN_GPG_PASSPHRASE, the name maven-gpg-plugin reads by
default, while the Makefile, sign-file and the sbt build read GPG_PASSWORD.
Nothing bridged them, so make release signed with an empty passphrase and
succeeded only where a gpg agent already held the key cached.
Settle on MAVEN_GPG_PASSPHRASE everywhere rather than bridging the two, so the
passphrase has a single name across the Makefile, sign-file, build.sbt and
release-build.sh. GPG_PASSWORD is no longer consulted; anyone setting it in a
local script has to rename it.
---
Makefile | 12 ++++++------
RELEASE_NOTES.md | 3 +++
build.sbt | 2 +-
etc/tools/sign-file | 4 ++--
4 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index b2735005..e4a878d3 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@ IMAGE?=jupyter/all-spark-notebook:latest
EXAMPLE_IMAGE?=apache/toree-examples
TOREE_DEV_IMAGE?=apache/toree-dev
GPG?=gpg
-GPG_PASSWORD?=
+MAVEN_GPG_PASSPHRASE?=
BINDER_IMAGE?=apache/toree-binder
DOCKER_WORKDIR?=/srv/toree
DOCKER_ARGS?=
@@ -237,7 +237,7 @@ system-test: pip-release .toree-dev-image
# Jars
################################################################################
publish-jars:
- @$(ENV_OPTS) GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) sbt publish-signed
+ @$(ENV_OPTS) MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) sbt publish-signed
################################################################################
# PIP PACKAGE
@@ -279,10 +279,10 @@ dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz: dist/toree
pip-release: dist/toree-pip/toree-$(BASE_VERSION).tar.gz dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512: dist/toree-pip/toree-$(BASE_VERSION).tar.gz
- @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/toree-pip/toree-$(BASE_VERSION).tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/toree-pip/toree-$(BASE_VERSION).tar.gz
dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.asc dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.sha512: dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
- @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz
sign-pip: dist/toree-pip/toree-$(BASE_VERSION).tar.gz.asc dist/toree-pip/toree-$(BASE_VERSION).tar.gz.sha512 dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.asc dist/apache-toree-pip/apache-toree-$(BASE_VERSION).tar.gz.sha512
@@ -318,7 +318,7 @@ dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz: dist/toree
bin-release: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz
dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.asc dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.sha512: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz
- @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz
sign-bin: dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.asc dist/apache-toree-bin/apache-toree-$(VERSION)-bin.tar.gz.sha512
@@ -334,7 +334,7 @@ dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz:
src-release: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz
dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.asc dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.sha512: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz
- @GPG_PASSWORD='$(GPG_PASSWORD)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz
+ @MAVEN_GPG_PASSPHRASE='$(MAVEN_GPG_PASSPHRASE)' GPG=$(GPG) etc/tools/./sign-file dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz
sign-src: dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.asc dist/apache-toree-src/apache-toree-$(VERSION)-src.tar.gz.sha512
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index adb37acc..724c59b0 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -51,6 +51,9 @@
- pip packages remain as `toree` and `apache-toree` (no change)
- Staging layout on dist.apache.org: the `toree` directory holding the binary
and source artifacts is now `apache-toree`
+* The GPG passphrase is read from `MAVEN_GPG_PASSPHRASE` throughout the release
+ tooling; the `GPG_PASSWORD` variable previously understood by the Makefile,
+ `sign-file` and the sbt build is no longer consulted.
* Release artifacts no longer ship `.md5` checksums, which the ASF has
deprecated for release distribution. `.asc` signatures and `.sha512`
checksums are unchanged.
diff --git a/build.sbt b/build.sbt
index 09724d53..30e924f8 100644
--- a/build.sbt
+++ b/build.sbt
@@ -90,7 +90,7 @@ ThisBuild / libraryDependencies ++= Seq(
)
// Publish settings
-ThisBuild / pgpPassphrase := Some(Properties.envOrElse("GPG_PASSWORD","").toArray)
+ThisBuild / pgpPassphrase := Some(Properties.envOrElse("MAVEN_GPG_PASSPHRASE","").toArray)
ThisBuild / publishTo := {
if (isSnapshot.value)
Some("Apache Staging Repo" at "https://repository.apache.org/content/repositories/snapshots/")
diff --git a/etc/tools/sign-file b/etc/tools/sign-file
index fb854a56..a23e5c78 100755
--- a/etc/tools/sign-file
+++ b/etc/tools/sign-file
@@ -33,8 +33,8 @@ FWDIR="$(cd `dirname $0`/../../; pwd)"
file_to_sign="${FWDIR}/$1"
if [[ -f "${file_to_sign}" ]]; then
echo "Generating signature and sums for ${file_to_sign}"
- echo ${GPG_PASSWORD} | ${GPG} --passphrase-fd 0 --armor --output "${file_to_sign}.asc" --detach-sig "${file_to_sign}"
- echo ${GPG_PASSWORD} | ${GPG} --passphrase-fd 0 --print-md SHA512 "${file_to_sign}" > "${file_to_sign}.sha512"
+ echo ${MAVEN_GPG_PASSPHRASE} | ${GPG} --passphrase-fd 0 --armor --output "${file_to_sign}.asc" --detach-sig "${file_to_sign}"
+ echo ${MAVEN_GPG_PASSPHRASE} | ${GPG} --passphrase-fd 0 --print-md SHA512 "${file_to_sign}" > "${file_to_sign}.sha512"
exit 0
else
echo "ERROR: File ${file_to_sign} does not exist"
(incubator-toree) 02/05: Refactor release script to separate prepare from publish
Posted by lr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lresende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git
commit 5d8e4cf206ac5e9dd24757615ef7cbbd226158f2
Author: Luciano Resende <lr...@apple.com>
AuthorDate: Fri May 1 19:19:48 2026 -0700
Refactor release script to separate prepare from publish
- release-prepare is now purely local: clone, version bump,
tag, and build. No external pushes (git, SVN, Maven).
- release-publish owns all external operations: push git commits
and tags, stage artifacts to Apache SVN dist/dev, deploy
assembly jar to Maven staging.
- Add dependency validation (fail-fast if git/svn/mvn/gpg missing)
- Add artifact validation before publish (verify all expected
tarballs, the assembly jar and the POM the deploy passes through
-DpomFile exist before any external push)
- publish reuses artifacts from prepare (no rebuild)
- publish-pip now uploads both toree and apache-toree packages
- Update help text, examples, and option descriptions
- Fix typo: "interaction" -> "iteration" in commit message
Validating the POM matters as much as the jar: the deploy is the last
step of publish, so a missing POM would otherwise surface only after the
release tag is pushed and the artifacts are committed to dist.apache.org.
---
etc/tools/release-build.sh | 257 +++++++++++++++++++++++++++++----------------
1 file changed, 165 insertions(+), 92 deletions(-)
diff --git a/etc/tools/release-build.sh b/etc/tools/release-build.sh
index d8359ec0..df2387b4 100755
--- a/etc/tools/release-build.sh
+++ b/etc/tools/release-build.sh
@@ -24,29 +24,35 @@ release-build - Creates build distributions from a git commit hash or from HEAD.
SYNOPSIS
-usage: release-build.sh [--release-prepare | --release-publish | --release-snapshot]
+usage: release-build.sh [--release-prepare | --release-publish]
DESCRIPTION
-Use maven infrastructure to create a project release package and publish
-to staging release location (https://dist.apache.org/repos/dist/dev/incubator/toree/)
-and maven staging release repository.
+Prepare and publish Apache Toree release artifacts.
---release-prepare --releaseVersion="0.2.0" --developmentVersion="0.2.0.dev1" [--releaseRc="rc1"] [--tag="v2.0.0"] [--gitCommitHash="a874b73"]
-This form execute maven release:prepare and upload the release candidate distribution
-to the staging release location.
+--release-prepare builds the release locally without pushing to any external
+system. Artifacts are left in target/toree/dist/ for review.
---release-publish --gitCommitHash="a874b73"
-Publish the maven artifacts of a release to the Apache staging maven repository.
+--release-publish publishes a previously prepared release: pushes git commits
+and tags, stages artifacts to Apache SVN dist/dev, and deploys the assembly
+jar to the Apache Maven staging repository.
+
+--release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0" [--releaseRc="rc1"] [--tag="v0.6.0-incubating-rc1"] [--gitCommitHash="a874b73"] [--dryRun]
+Prepare a release locally: clone, version bump, tag, and build all artifacts.
+Use --dryRun to test version bump logic without building.
+
+--release-publish --releaseVersion="0.6.0" [--releaseRc="rc1"] [--tag="v0.6.0-incubating-rc1"]
+Publish a previously prepared release. Requires --release-prepare to have been
+run first. Does NOT support --dryRun.
OPTIONS
--releaseVersion - Release identifier used when publishing
---developmentVersion - Release identifier used for next development cyce
+--developmentVersion - Release identifier used for next development cycle
--releaseRc - Release RC identifier used when publishing, default 'rc1'
---tag - Release Tag identifier used when taging the release, default 'v$releaseVersion'
---gitCommitHash - Release tag or commit to build from, default master HEAD
---dryRun - Dry run only, mostly used for testing.
+--tag - Release Tag identifier used when tagging the release, default 'v\$releaseVersion-incubating-\$releaseRc'
+--gitCommitHash - Commit to build from, default master HEAD (prepare only)
+--dryRun - Dry run only, skips the build step (prepare only)
A GPG passphrase is expected as an environment variable
@@ -54,12 +60,12 @@ MAVEN_GPG_PASSPHRASE - Passphrase for GPG key used to sign release
EXAMPLES
-release-build.sh --release-prepare --releaseVersion="0.2.0" --developmentVersion="0.3.0.dev1"
-release-build.sh --release-prepare --releaseVersion="0.2.0" --developmentVersion="0.3.0.dev1" --releaseRc="rc1" --tag="v0.2.0-incubating-rc1"
-release-build.sh --release-prepare --releaseVersion="0.2.0" --developmentVersion="0.3.0.dev1" --releaseRc="rc1" --tag="v0.2.0-incubating-rc1" --gitCommitHash="a874b73" --dryRun
+release-build.sh --release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0"
+release-build.sh --release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0" --releaseRc="rc1" --tag="v0.6.0-incubating-rc1"
+release-build.sh --release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0" --releaseRc="rc1" --dryRun
-release-build.sh --release-publish --gitCommitHash="a874b73"
-release-build.sh --release-publish --gitTag="v0.2.0-incubating-rc1"
+release-build.sh --release-publish --releaseVersion="0.6.0"
+release-build.sh --release-publish --releaseVersion="0.6.0" --releaseRc="rc1"
EOF
exit 1
@@ -152,6 +158,7 @@ fi
# https://github.com/apache/maven-gpg-plugin/blob/76316ce61699afaec7a298fd279e1c9133c38ac6/src/main/java/org/apache/maven/plugins/gpg/AbstractGpgMojo.java#L45
export MAVEN_GPG_PASSPHRASE
+# --release-prepare validation
if [[ "$RELEASE_PREPARE" == "true" && -z "$RELEASE_VERSION" ]]; then
echo "ERROR: --releaseVersion must be passed as an argument to run this script"
exit_with_usage
@@ -162,15 +169,10 @@ if [[ "$RELEASE_PREPARE" == "true" && -z "$DEVELOPMENT_VERSION" ]]; then
exit_with_usage
fi
-if [[ "$RELEASE_PUBLISH" == "true" ]]; then
- if [[ "$GIT_REF" && "$GIT_TAG" ]]; then
- echo "ERROR: Only one argumented permitted when publishing : --gitCommitHash or --gitTag"
- exit_with_usage
- fi
- if [[ -z "$GIT_REF" && -z "$GIT_TAG" ]]; then
- echo "ERROR: --gitCommitHash OR --gitTag must be passed as an argument to run this script"
- exit_with_usage
- fi
+# --release-publish validation
+if [[ "$RELEASE_PUBLISH" == "true" && -z "$RELEASE_VERSION" ]]; then
+ echo "ERROR: --releaseVersion must be passed as an argument to run this script"
+ exit_with_usage
fi
if [[ "$RELEASE_PUBLISH" == "true" && "$DRY_RUN" ]]; then
@@ -180,14 +182,10 @@ fi
# Commit ref to checkout when building
GIT_REF=${GIT_REF:-master}
-if [[ "$RELEASE_PUBLISH" == "true" && "$GIT_TAG" ]]; then
- GIT_REF="tags/$GIT_TAG"
-fi
BASE_DIR=$(pwd)
MVN="mvn"
-PUBLISH_PROFILES="-Pdistribution"
if [ -z "$RELEASE_RC" ]; then
RELEASE_RC="rc1"
@@ -205,7 +203,7 @@ RELEASE_STAGING_LOCATION="https://dist.apache.org/repos/dist/dev/incubator/toree
echo " "
echo "-------------------------------------------------------------"
-echo "------- Release preparation with the following parameters ---"
+echo "------- Release configuration -------------------------------"
echo "-------------------------------------------------------------"
echo "Executing ==> $GOAL"
echo "Git reference ==> $GIT_REF"
@@ -223,10 +221,60 @@ echo "Deploying to :"
echo $RELEASE_STAGING_LOCATION
echo " "
+function validate_dependency {
+ if ! command -v "$1" &> /dev/null; then
+ echo "ERROR: $1 is not installed or not on PATH"
+ exit 1
+ fi
+}
+
+function validate_prepare_dependencies {
+ echo "Validating prepare dependencies..."
+ validate_dependency git
+ validate_dependency docker
+ validate_dependency sbt
+}
+
+function validate_publish_dependencies {
+ echo "Validating publish dependencies..."
+ validate_dependency git
+ validate_dependency svn
+ validate_dependency mvn
+ validate_dependency gpg
+}
+
+function validate_artifacts {
+ echo "Validating release artifacts in target/toree/dist/..."
+ local has_error=false
+
+ local artifacts=(
+ "target/toree/dist/apache-toree-bin/apache-toree-$FULL_RELEASE_VERSION-bin.tar.gz"
+ "target/toree/dist/apache-toree-src/apache-toree-$FULL_RELEASE_VERSION-src.tar.gz"
+ "target/toree/dist/toree-pip/toree-$RELEASE_VERSION.tar.gz"
+ "target/toree/dist/apache-toree-pip/apache-toree-$RELEASE_VERSION.tar.gz"
+ "target/toree/dist/toree/lib/toree-assembly-$FULL_RELEASE_VERSION.jar"
+ "target/toree/dist/toree/toree-assembly-$FULL_RELEASE_VERSION.pom"
+ )
+
+ for artifact in "${artifacts[@]}"; do
+ if [ ! -f "$BASE_DIR/$artifact" ]; then
+ echo "ERROR: Missing artifact: $artifact"
+ has_error=true
+ fi
+ done
+
+ if [ "$has_error" = true ]; then
+ echo ""
+ echo "Release artifacts are incomplete. Run --release-prepare first."
+ exit 1
+ fi
+
+ echo "All release artifacts found."
+}
+
set -o xtrace
function checkout_code {
- # Checkout code
rm -rf target
mkdir target
cd target
@@ -240,26 +288,31 @@ function checkout_code {
cd "$BASE_DIR" #return to base dir
}
+###############################################################################
+# release-prepare
+#
+# Prepares a release locally: clone, version bump, tag, and build.
+# Does NOT push to any external system (git, SVN, Maven).
+###############################################################################
if [[ "$RELEASE_PREPARE" == "true" ]]; then
echo "Preparing release $FULL_RELEASE_VERSION ($RELEASE_VERSION)"
+
+ validate_prepare_dependencies
+
# Checkout code
checkout_code
cd target/toree
- # Build and prepare the release
+ # Bump version to release, commit, and tag
sed -i .bak "s@^BASE_VERSION.*@BASE_VERSION?=$RELEASE_VERSION@g" Makefile
git commit Makefile -m"Prepare release $FULL_RELEASE_VERSION"
git tag $RELEASE_TAG
git_tag_hash=`git rev-parse --short HEAD`
+
+ # Bump version to next development iteration
sed -i .bak "s@^BASE_VERSION.*@BASE_VERSION?=$DEVELOPMENT_VERSION@g" Makefile
- git commit Makefile -m"Prepare for next development interaction $DEVELOPMENT_VERSION"
+ git commit Makefile -m"Prepare for next development iteration $DEVELOPMENT_VERSION"
echo "Created release tag $RELEASE_TAG at git hash $git_tag_hash"
- if [ -n "$DRY_RUN" ]; then
- echo "DRY RUN: Skipping git push"
- else
- git push
- git push --tags
- fi
cd .. #exit toree
@@ -270,67 +323,77 @@ if [[ "$RELEASE_PREPARE" == "true" ]]; then
make clean dist release
- cd "$BASE_DIR/target"
- svn co $RELEASE_STAGING_LOCATION svn-toree
- mkdir -p svn-toree/$RELEASE_STAGING_FOLDER/apache-toree
- mkdir -p svn-toree/$RELEASE_STAGING_FOLDER/toree-pip
- mkdir -p svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip
-
- cp toree/dist/apache-toree-bin/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/apache-toree
- cp toree/dist/apache-toree-src/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/apache-toree
- cp toree/dist/toree-pip/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/toree-pip
- cp -r toree/dist/toree-pip/toree.egg-info svn-toree/$RELEASE_STAGING_FOLDER/toree-pip/
- cp toree/dist/apache-toree-pip/*.tar.gz svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip
- cp -r toree/dist/apache-toree-pip/*toree.egg-info svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip/
-
- cd "$BASE_DIR/target/svn-toree/$RELEASE_STAGING_FOLDER/apache-toree"
- rm -f *.asc
- for i in *.tar.gz; do gpg --output $i.asc --detach-sig --armor $i; done
- rm -f *.sha*
- for i in *.tar.gz; do shasum --algorithm 512 $i > $i.sha512; done
-
- cd "$BASE_DIR/target/svn-toree/$RELEASE_STAGING_FOLDER/toree-pip"
- rm -f *.asc
- for i in *.tar.gz; do gpg --output $i.asc --detach-sig --armor $i; done
- rm -f *.sha*
- for i in *.tar.gz; do shasum --algorithm 512 $i > $i.sha512; done
-
- cd "$BASE_DIR/target/svn-toree/$RELEASE_STAGING_FOLDER/apache-toree-pip"
- rm -f *.asc
- for i in *.tar.gz; do gpg --output $i.asc --detach-sig --armor $i; done
- rm -f *.sha*
- for i in *.tar.gz; do shasum --algorithm 512 $i > $i.sha512; done
-
- cd "$BASE_DIR/target/svn-toree/" #exit $RELEASE_STAGING_FOLDER/
-
- svn add $RELEASE_STAGING_FOLDER/
- svn ci -m"Apache Toree $RELEASE_STAGING_FOLDER"
-
- cd "$BASE_DIR/target"
- # The passphrase reaches the plugin through MAVEN_GPG_PASSPHRASE rather than the
- # command line, where it would be visible to any local user through ps.
- mvn "$MVN_GPG_PLUGIN:sign-and-deploy-file" \
- -Dfile="toree/dist/toree/lib/toree-assembly-$RELEASE_VERSION-incubating.jar" \
- -DpomFile="toree/dist/toree/toree-assembly-$RELEASE_VERSION-incubating.pom" \
- -DrepositoryId=apache.releases.https \
- -Durl=https://repository.apache.org/service/local/staging/deploy/maven2
+ # Create SVN staging folder locally for review
+ mkdir -p dist/svn-release/$RELEASE_STAGING_FOLDER/apache-toree
+ mkdir -p dist/svn-release/$RELEASE_STAGING_FOLDER/toree-pip
+ mkdir -p dist/svn-release/$RELEASE_STAGING_FOLDER/apache-toree-pip
+
+ cp dist/apache-toree-bin/* dist/svn-release/$RELEASE_STAGING_FOLDER/apache-toree/
+ cp dist/apache-toree-src/* dist/svn-release/$RELEASE_STAGING_FOLDER/apache-toree/
+ cp dist/toree-pip/*.tar.gz dist/toree-pip/*.asc dist/toree-pip/*.sha512 dist/svn-release/$RELEASE_STAGING_FOLDER/toree-pip/
+ cp -r dist/toree-pip/toree.egg-info dist/svn-release/$RELEASE_STAGING_FOLDER/toree-pip/
+ cp dist/apache-toree-pip/*.tar.gz dist/apache-toree-pip/*.asc dist/apache-toree-pip/*.sha512 dist/svn-release/$RELEASE_STAGING_FOLDER/apache-toree-pip/
+ cp -r dist/apache-toree-pip/*toree.egg-info dist/svn-release/$RELEASE_STAGING_FOLDER/apache-toree-pip/
fi
- cd "$BASE_DIR" #exit target
+ cd "$BASE_DIR" #return to base dir
+
+ echo ""
+ echo "-------------------------------------------------------------"
+ echo "------- Release preparation complete ------------------------"
+ echo "-------------------------------------------------------------"
+ echo ""
+ echo "Release artifacts are available at: $BASE_DIR/target/toree/dist/"
+ echo "SVN staging folder is assembled at: $BASE_DIR/target/toree/dist/svn-release/$RELEASE_STAGING_FOLDER"
+ echo ""
+ echo "Review the artifacts, then publish the release with:"
+ echo ""
+ echo " release-build.sh --release-publish --releaseVersion=\"$RELEASE_VERSION\" --releaseRc=\"$RELEASE_RC\""
+ echo ""
exit 0
fi
+###############################################################################
+# release-publish
+#
+# Publishes a previously prepared release. Pushes git commits and tags,
+# stages artifacts to Apache SVN dist/dev, and deploys the assembly jar
+# to the Apache Maven staging repository.
+#
+# Requires --release-prepare to have been run first.
+###############################################################################
if [[ "$RELEASE_PUBLISH" == "true" ]]; then
- echo "Preparing release $RELEASE_VERSION"
- # Checkout code
+ echo "Publishing release $FULL_RELEASE_VERSION ($RELEASE_VERSION)"
+
+ validate_publish_dependencies
+
+ # Verify that prepare was run and artifacts exist
+ if [ ! -d "$BASE_DIR/target/toree" ]; then
+ echo "ERROR: target/toree does not exist. Run --release-prepare first."
+ exit 1
+ fi
+
+ validate_artifacts
+
+ # Push release commits and tag to remote
cd "$BASE_DIR/target/toree"
- git checkout $RELEASE_TAG
- git clean -d -f -x
+ git checkout master
+ git push
+ git push --tags
- make clean dist release
+ # Stage artifacts in Apache SVN dist/dev
+ cd "$BASE_DIR/target"
+ svn co $RELEASE_STAGING_LOCATION svn-toree
+ cp -r toree/dist/svn-release/$RELEASE_STAGING_FOLDER svn-toree/
+
+ # Commit staged artifacts to SVN
+ cd "$BASE_DIR/target/svn-toree/"
+ svn add $RELEASE_STAGING_FOLDER/
+ svn ci -m"Apache Toree $RELEASE_STAGING_FOLDER"
+ # Deploy assembly jar to Apache Maven staging
cd "$BASE_DIR/target"
# The passphrase reaches the plugin through MAVEN_GPG_PASSPHRASE rather than the
# command line, where it would be visible to any local user through ps.
@@ -340,7 +403,17 @@ if [[ "$RELEASE_PUBLISH" == "true" ]]; then
-DrepositoryId=apache.releases.https \
-Durl=https://repository.apache.org/service/local/staging/deploy/maven2
- cd "$BASE_DIR" #exit target
+ cd "$BASE_DIR" #return to base dir
+
+ echo ""
+ echo "-------------------------------------------------------------"
+ echo "------- Release publish complete ----------------------------"
+ echo "-------------------------------------------------------------"
+ echo ""
+ echo "Git commits and tag pushed to remote"
+ echo "Artifacts staged to $RELEASE_STAGING_LOCATION$RELEASE_STAGING_FOLDER/"
+ echo "Assembly jar deployed to Apache Maven staging"
+ echo ""
exit 0
fi
(incubator-toree) 05/05: Add missing ASF license header to dependabot.yml
Posted by lr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lresende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git
commit 82340a9c7e97e9b72e8025d0631a9b81acb652e5
Author: Luciano Resende <lr...@apple.com>
AuthorDate: Mon Sep 14 00:16:06 2026 +0200
Add missing ASF license header to dependabot.yml
---
.github/dependabot.yml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 5ace4600..8214db26 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
version: 2
updates:
- package-ecosystem: "github-actions"
(incubator-toree) 03/05: Allow a release to be prepared from another repository
Posted by lr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lresende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git
commit 87c8f51ad7c5c763f176c8172063cbb14bf8faf1
Author: Luciano Resende <lr...@apple.com>
AuthorDate: Sat Sep 12 23:28:10 2026 +0200
Allow a release to be prepared from another repository
checkout_code cloned the ASF canonical repository unconditionally, so a change
to the release tooling could not be exercised until it was already on master.
The first real run of a change to the Makefile or to this script was therefore
the release itself.
--gitRepo overrides the clone source and accepts a local path, which makes a
full rehearsal possible from a branch. It defaults to the canonical repository,
and any other value prints a warning that the result must not be published.
--gitCommitHash already accepted a branch or tag, since it is handed to git
checkout; say so in the help text.
The option belongs to prepare alone: publish has no clone to make, and
operates on the tree prepare left in target/toree. Accepting it there and
ignoring it read as though it scoped the publish to that repository while
the SVN staging and Maven deploy went to the canonical ASF locations
regardless, so publish rejects it alongside the --dryRun it sits next to.
The check reads GIT_REPO before the default is applied, so it fires only on
an option the caller passed rather than on the canonical fallback.
That rejection is not what keeps a rehearsal from being published. Publish
cannot tell which repository prepare cloned, and pushes to whatever remote
that clone carries; the warning at prepare time remains the only signal.
---
etc/tools/release-build.sh | 35 +++++++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
diff --git a/etc/tools/release-build.sh b/etc/tools/release-build.sh
index df2387b4..8245d68c 100755
--- a/etc/tools/release-build.sh
+++ b/etc/tools/release-build.sh
@@ -37,9 +37,10 @@ system. Artifacts are left in target/toree/dist/ for review.
and tags, stages artifacts to Apache SVN dist/dev, and deploys the assembly
jar to the Apache Maven staging repository.
---release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0" [--releaseRc="rc1"] [--tag="v0.6.0-incubating-rc1"] [--gitCommitHash="a874b73"] [--dryRun]
+--release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0" [--releaseRc="rc1"] [--tag="v0.6.0-incubating-rc1"] [--gitCommitHash="a874b73"] [--gitRepo="/path/to/repo"] [--dryRun]
Prepare a release locally: clone, version bump, tag, and build all artifacts.
-Use --dryRun to test version bump logic without building.
+Use --dryRun to test version bump logic without building. Use --gitRepo to
+rehearse a release from a fork or a local clone before the change is on master.
--release-publish --releaseVersion="0.6.0" [--releaseRc="rc1"] [--tag="v0.6.0-incubating-rc1"]
Publish a previously prepared release. Requires --release-prepare to have been
@@ -51,7 +52,10 @@ OPTIONS
--developmentVersion - Release identifier used for next development cycle
--releaseRc - Release RC identifier used when publishing, default 'rc1'
--tag - Release Tag identifier used when tagging the release, default 'v\$releaseVersion-incubating-\$releaseRc'
---gitCommitHash - Commit to build from, default master HEAD (prepare only)
+--gitCommitHash - Commit, branch or tag to build from, default master HEAD (prepare only)
+--gitRepo - Repository to build from, default the ASF canonical repository.
+ Accepts a local path, so release tooling changes can be
+ rehearsed before they land on master (prepare only)
--dryRun - Dry run only, skips the build step (prepare only)
A GPG passphrase is expected as an environment variable
@@ -63,6 +67,7 @@ EXAMPLES
release-build.sh --release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0"
release-build.sh --release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0" --releaseRc="rc1" --tag="v0.6.0-incubating-rc1"
release-build.sh --release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0" --releaseRc="rc1" --dryRun
+release-build.sh --release-prepare --releaseVersion="0.6.0" --developmentVersion="0.7.0.dev0" --gitRepo="$HOME/src/incubator-toree" --gitCommitHash="my-branch"
release-build.sh --release-publish --releaseVersion="0.6.0"
release-build.sh --release-publish --releaseVersion="0.6.0" --releaseRc="rc1"
@@ -101,6 +106,10 @@ while [ "${1+defined}" ]; do
GIT_REF="${PARTS[1]}"
shift
;;
+ --gitRepo)
+ GIT_REPO="${PARTS[1]}"
+ shift
+ ;;
--gitTag)
GIT_TAG="${PARTS[1]}"
shift
@@ -180,9 +189,20 @@ if [[ "$RELEASE_PUBLISH" == "true" && "$DRY_RUN" ]]; then
exit_with_usage
fi
+if [[ "$RELEASE_PUBLISH" == "true" && -n "$GIT_REPO" ]]; then
+ echo "ERROR: --gitRepo not supported for --release-publish"
+ exit_with_usage
+fi
+
# Commit ref to checkout when building
GIT_REF=${GIT_REF:-master}
+# Repository to build from. A release must be cut from the ASF canonical
+# repository; an override exists so that changes to the release tooling itself
+# can be rehearsed against a fork or a local clone before they land on master.
+GIT_REPO_CANONICAL="https://gitbox.apache.org/repos/asf/incubator-toree.git"
+GIT_REPO=${GIT_REPO:-$GIT_REPO_CANONICAL}
+
BASE_DIR=$(pwd)
MVN="mvn"
@@ -206,6 +226,7 @@ echo "-------------------------------------------------------------"
echo "------- Release configuration -------------------------------"
echo "-------------------------------------------------------------"
echo "Executing ==> $GOAL"
+echo "Git repository ==> $GIT_REPO"
echo "Git reference ==> $GIT_REF"
echo "Release version ==> $RELEASE_VERSION"
echo "Full Release version ==> $FULL_RELEASE_VERSION"
@@ -221,6 +242,12 @@ echo "Deploying to :"
echo $RELEASE_STAGING_LOCATION
echo " "
+if [[ "$GIT_REPO" != "$GIT_REPO_CANONICAL" ]]; then
+ echo "WARNING: Building from $GIT_REPO rather than the ASF canonical repository."
+ echo "WARNING: The result is a rehearsal and must not be published as a release."
+ echo " "
+fi
+
function validate_dependency {
if ! command -v "$1" &> /dev/null; then
echo "ERROR: $1 is not installed or not on PATH"
@@ -279,7 +306,7 @@ function checkout_code {
mkdir target
cd target
rm -rf toree
- git clone https://gitbox.apache.org/repos/asf/incubator-toree.git toree
+ git clone "$GIT_REPO" toree
cd toree
git checkout $GIT_REF
git_hash=`git rev-parse --short HEAD`