This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 41852bcfdd Add release scripts in Camel Quarkus for uploading and
promoting sour… (#5571)
41852bcfdd is described below
commit 41852bcfdd454788ac7ed121447acbf2a9f36935
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Nov 29 13:41:18 2023 +0100
Add release scripts in Camel Quarkus for uploading and promoting sour…
(#5571)
* Add release scripts in Camel Quarkus for uploading and promoting source
in Apache Dist
Signed-off-by: Andrea Cosentino <[email protected]>
* Update release-utils/scripts/upload-source.sh
Co-authored-by: James Netherton <[email protected]>
* Add release scripts in Camel Quarkus for uploading and promoting source
in Apache Dist
Signed-off-by: Andrea Cosentino <[email protected]>
---------
Signed-off-by: Andrea Cosentino <[email protected]>
Co-authored-by: James Netherton <[email protected]>
---
.../pages/contributor-guide/release-guide.adoc | 22 +++++++-----
pom.xml | 1 +
release-utils/scripts/promote-release.sh | 26 +++++++++++++++
release-utils/scripts/sign.sh | 36 ++++++++++++++++++++
release-utils/scripts/upload-source.sh | 39 ++++++++++++++++++++++
5 files changed, 116 insertions(+), 8 deletions(-)
diff --git a/docs/modules/ROOT/pages/contributor-guide/release-guide.adoc
b/docs/modules/ROOT/pages/contributor-guide/release-guide.adoc
index d8e6fd013d..526fc3c768 100644
--- a/docs/modules/ROOT/pages/contributor-guide/release-guide.adoc
+++ b/docs/modules/ROOT/pages/contributor-guide/release-guide.adoc
@@ -71,19 +71,15 @@ $ mvn deploy -Papache-release -DskipTests -Denforcer.skip
-Dquarkus.build.skip -
== Update the Apache Camel Quarkus development subversion repository
-The process is identical to that outlined in the `Assemble the Apache Camel
Quarkus sources distribution` section below. Except that you must checkout the
`dev` SVN repository.
+Camel-Quarkus provides some release scripts to push the required bits in
development subversion repository.
[source,shell]
----
-$ svn checkout 'https://dist.apache.org/repos/dist/dev/camel'
camel-releases-dist
+$ cd release-utils/scripts/
+$ ./upload-source.sh $VERSION $VERSION
----
-When exporting the `URL` variable, it should be set to the closed staging
repository URL for the new release. For example.
-
-[source,shell]
-----
-$ export
URL='https://repository.apache.org/content/repositories/orgapachecamel-1647/org/apache/camel/quarkus/camel-quarkus'
-----
+This will take care of grabbing the source zip from github and getting the
SBOMs from target directory. After signing the files, it will push the folder
to `dist/dev/`
After the changes have been committed. You can check them by browsing to
https://dist.apache.org/repos/dist/dev/camel/camel-quarkus/.
@@ -253,6 +249,16 @@ $ svn add --force .
$ svn commit -m "Apache Camel Quarkus $VERSION released artifacts"
----
+Altenatively you could also use the release-scripts promote-release.sh
+
+[source,shell]
+----
+$ cd release-utils/scripts/
+$ ./promote-release.sh $VERSION $VERSION
+----
+
+where `$VERSION` is the version just released.
+
== Upgrade Camel Quarkus in Quarkus Platform
You can proceed with upgrading Camel Quarkus in Quarkus Platform
diff --git a/pom.xml b/pom.xml
index d33f556e78..738d6ad2d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -589,6 +589,7 @@
<exclude>**/src/test/resources/__files/*.xml</exclude>
<exclude>.github/actions/**</exclude>
<exclude>**/my-property</exclude>
+ <exclude>release-utils/*.sh</exclude>
</excludes>
<mapping>
<cli>CAMEL_PROPERTIES_STYLE</cli>
diff --git a/release-utils/scripts/promote-release.sh
b/release-utils/scripts/promote-release.sh
new file mode 100755
index 0000000000..51b7aa7d44
--- /dev/null
+++ b/release-utils/scripts/promote-release.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -e
+
+if [ "$#" -lt 1 ]; then
+ echo "usage: $0 promote-release release-version"
+ exit 1
+fi
+
+svn mv https://dist.apache.org/repos/dist/dev/camel/camel-quarkus/$1/
https://dist.apache.org/repos/dist/release/camel/camel-quarkus/$1/ -m "Promote
release from dev to release"
diff --git a/release-utils/scripts/sign.sh b/release-utils/scripts/sign.sh
new file mode 100755
index 0000000000..ae22f18c60
--- /dev/null
+++ b/release-utils/scripts/sign.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# 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.
+#
+
+# This is a utility script to sign and sha512 all files in the given directory.
+
+if [ "$#" -ne 1 ]; then
+ echo "usage: $0 dir"
+ exit 1
+fi
+
+dir=$1
+
+pushd . && cd $dir
+
+for f in $(ls);
+do
+ sha512sum -b $f > $f.sha512
+ gpg --output $f.asc --armor --detach-sig $f
+done
+
+popd
diff --git a/release-utils/scripts/upload-source.sh
b/release-utils/scripts/upload-source.sh
new file mode 100755
index 0000000000..b5e96fb378
--- /dev/null
+++ b/release-utils/scripts/upload-source.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+#
+# 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.
+#
+
+set -e
+
+if [ "$#" -lt 2 ]; then
+ echo "usage: $0 upload-sources release-version destination-version"
+ exit 1
+fi
+
+location=$(dirname $0)
+version=$1
+
+mkdir $1/
+cd $1/
+
+wget https://github.com/apache/camel-quarkus/archive/refs/tags/$1.zip -O
apache-camel-quarkus-$1-src.zip
+cp ../../../target/checkout/target/camel-quarkus-$1-sbom.json
apache-camel-quarkus-$1-sbom.json
+cp ../../../target/checkout/target/camel-quarkus-$1-sbom.xml
apache-camel-quarkus-$1-sbom.xml
+cd ../
+./sign.sh $1/
+svn import $1/ https://dist.apache.org/repos/dist/dev/camel/camel-quarkus/$2/
-m "Import camel-quarkus release"
+
+rm -rf $1/