Skip to content

Commit

Permalink
Added Release tools to upload and promote sources in ASF
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
  • Loading branch information
oscerd committed Dec 12, 2022
1 parent 365a662 commit a7f323c
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
25 changes: 25 additions & 0 deletions release-utils/scripts/promote-release.sh
Original file line number Diff line number Diff line change
@@ -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"
35 changes: 35 additions & 0 deletions release-utils/scripts/sign.sh
Original file line number Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions release-utils/scripts/upload-source.sh
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit a7f323c

Please sign in to comment.