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-upgrade-recipes.git


The following commit(s) were added to refs/heads/main by this push:
     new 129ed37  Added release-script tools
129ed37 is described below

commit 129ed374b0b0e0321929c498f5caa82151860579
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Mon Sep 30 14:23:32 2024 +0200

    Added release-script tools
    
    Signed-off-by: Andrea Cosentino <anco...@gmail.com>
---
 release-utils/scripts/promote-release.sh | 25 ++++++++++++++++++++++
 release-utils/scripts/sign.sh            | 35 +++++++++++++++++++++++++++++++
 release-utils/scripts/upload-source.sh   | 36 ++++++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+)

diff --git a/release-utils/scripts/promote-release.sh 
b/release-utils/scripts/promote-release.sh
new file mode 100755
index 0000000..0f0b203
--- /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-upgrade-recipes/$1/ 
https://dist.apache.org/repos/dist/release/camel/camel-upgrade-recipes/$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 0000000..7aafd10
--- /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);
+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 0000000..a8bcbf0
--- /dev/null
+++ b/release-utils/scripts/upload-source.sh
@@ -0,0 +1,36 @@
+#!/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-kamelets/archive/refs/tags/v$1.tar.gz -O 
camel-upgrade-recipes-sources-$1.tar.gz
+cd ../
+./sign.sh $1/
+svn import $1/ 
https://dist.apache.org/repos/dist/dev/camel/camel-upgrade-recipes/$2/ -m 
"Import camel-upgrade-recipes release"
+
+rm -rf $1/

Reply via email to