You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/12/12 10:51:52 UTC

[camel-k] branch release-1.11.x updated: Added Release tools to upload and promote sources in ASF

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch release-1.11.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/release-1.11.x by this push:
     new 9f115d965 Added Release tools to upload and promote sources in ASF
9f115d965 is described below

commit 9f115d9659e38e6fafc90355d5e6f9d9f40b3490
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 12 11:42:25 2022 +0100

    Added Release tools to upload and promote sources in ASF
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 release-utils/scripts/promote-release.sh | 25 +++++++++++++++++++++
 release-utils/scripts/sign.sh            | 35 +++++++++++++++++++++++++++++
 release-utils/scripts/upload-source.sh   | 38 ++++++++++++++++++++++++++++++++
 3 files changed, 98 insertions(+)

diff --git a/release-utils/scripts/promote-release.sh b/release-utils/scripts/promote-release.sh
new file mode 100755
index 000000000..a25922ef3
--- /dev/null
+++ b/release-utils/scripts/promote-release.sh
@@ -0,0 +1,25 @@
+#!/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-k/$1/ https://dist.apache.org/repos/dist/release/camel/camel-k/$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 000000000..cdd8b47b7
--- /dev/null
+++ b/release-utils/scripts/sign.sh
@@ -0,0 +1,35 @@
+#!/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 | grep -e ".*tar.gz$");
+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 000000000..1ff828e02
--- /dev/null
+++ b/release-utils/scripts/upload-source.sh
@@ -0,0 +1,38 @@
+#!/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-k/archive/refs/tags/v$1.tar.gz -O camel-k-sources-$1.tar.gz
+cp ../../../camel-k-client-$1-* .
+cp ../../../camel-k-examples-$1* .
+cd ../
+./sign.sh $1/
+svn import $1/ https://dist.apache.org/repos/dist/dev/camel/camel-k/$2/ -m "Import camel-k release"
+
+rm -rf $1/