You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/03/16 14:22:19 UTC

[incubator-opendal] branch main updated: chore(automation): fix release.sh packaging sha512sum (#1649)

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

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 8b55a4c2 chore(automation): fix release.sh packaging sha512sum (#1649)
8b55a4c2 is described below

commit 8b55a4c207bbfa5b8bdb1d28b9f81fff9170df1e
Author: ClSlaid <ca...@bupt.edu.cn>
AuthorDate: Thu Mar 16 22:22:13 2023 +0800

    chore(automation): fix release.sh packaging sha512sum (#1649)
    
    * automation: fix release.sh packaging sha512sum
    
    Signed-off-by: ClSlaid <ca...@bupt.edu.cn>
    
    * refactor: fix directory changes
    
    Signed-off-by: ClSlaid <ca...@bupt.edu.cn>
    
    ---------
    
    Signed-off-by: ClSlaid <ca...@bupt.edu.cn>
---
 scripts/README.md  |  7 ++++---
 scripts/check.sh   | 27 ++++++++++++++++-----------
 scripts/release.sh | 38 ++++++++++++++++++++++++++------------
 3 files changed, 46 insertions(+), 26 deletions(-)

diff --git a/scripts/README.md b/scripts/README.md
index 359c3057..8a69d49e 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -1,6 +1,7 @@
 # OpenDAL Scripts
 
-This module provides scripts to make maintainers lives easier. OpenDAL users don't need to care about this folder.
+This module provides scripts to make maintainers lives easier.
+OpenDAL users don't need to care about this folder.
 
 ## Release
 
@@ -23,8 +24,8 @@ OPENDAL_VERSION=0.30.2 OPENDAL_VERSION_RC=rc1 ./scripts/check.sh
 Import gpg key
 
 ```shell
-$ curl https://downloads.apache.org/incubator/opendal/KEYS > KEYS # Download KEYS
-$ gpg --import KEYS # Import KEYS to local
+curl https://downloads.apache.org/incubator/opendal/KEYS > KEYS # Download KEYS
+gpg --import KEYS # Import KEYS to local
 ```
 
 Trust the public key
diff --git a/scripts/check.sh b/scripts/check.sh
index 2a4ec6b8..d3dd51d0 100755
--- a/scripts/check.sh
+++ b/scripts/check.sh
@@ -16,14 +16,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-
 set -e
 
-if [ -z ${OPENDAL_VERSION} ]; then
-    echo "OPENDAL_VERSION is unset";
-    exit 1
+if [ -z "${OPENDAL_VERSION}" ]; then
+	echo "OPENDAL_VERSION is unset"
+	exit 1
 else
-    echo "var is set to '$OPENDAL_VERSION'";
+	echo "var is set to '$OPENDAL_VERSION'"
 fi
 
 # tar source code
@@ -34,16 +33,22 @@ rc_version=${OPENDAL_VERSION_RC:rc1}
 git_branch=release-${release_version}-${rc_version}
 
 echo "> Checkout release"
-svn co https://dist.apache.org/repos/dist/dev/incubator/opendal/${release_version}-${rc_version}/ incubator-opendal-release-verify
+svn co "https://dist.apache.org/repos/dist/dev/incubator/opendal/${release_version}-${rc_version}/" incubator-opendal-release-verify
 cd incubator-opendal-release-verify
 
 echo "> Check signature"
-for i in *.tar.gz; do echo $i; gpg --verify $i.asc $i ; done
+for i in *.tar.gz; do
+	echo "$i"
+	gpg --verify "$i.asc" "$i"
+done
 echo "> Check sha512sum"
-for i in *.tar.gz; do echo $i; sha512sum --check $i.sha512; done
+for i in *.tar.gz; do
+	echo "$i"
+	sha512sum --check "$i.sha512"
+done
 
 echo "> Check content"
-tar -xvf apache-incubator-opendal-${release_version}-src.tar.gz
+tar -xvf "apache-incubator-opendal-${release_version}-src.tar.gz"
 echo "> Check license"
-cd apache-incubator-opendal-${release_version}-src
-docker run -it --rm -v $(pwd):/github/workspace -u $(id -u):$(id -g) ghcr.io/korandoru/hawkeye-native check
+cd "apache-incubator-opendal-${release_version}-src"
+docker run -it --rm -v "$(pwd):/github/workspace" -u "$(id -u):$(id -g)" ghcr.io/korandoru/hawkeye-native check
diff --git a/scripts/release.sh b/scripts/release.sh
index 9eb1b786..ccf9993d 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -16,14 +16,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-
 set -e
 
-if [ -z ${OPENDAL_VERSION} ]; then
-    echo "OPENDAL_VERSION is unset";
-    exit 1
+if [ -z "${OPENDAL_VERSION}" ]; then
+	echo "OPENDAL_VERSION is unset"
+	exit 1
 else
-    echo "var is set to '$OPENDAL_VERSION'";
+	echo "var is set to '$OPENDAL_VERSION'"
 fi
 
 # tar source code
@@ -37,18 +36,33 @@ rm -rf dist
 mkdir -p dist/
 
 echo "> Checkout version branch"
-git checkout -B $git_branch
+git checkout -B "${git_branch}"
 
 echo "> Start package"
-git archive --format=tar.gz --output="dist/apache-incubator-opendal-$release_version-src.tar.gz" --prefix="apache-incubator-opendal-$release_version-src/"  $git_branch
+git archive --format=tar.gz --output="dist/apache-incubator-opendal-$release_version-src.tar.gz" --prefix="apache-incubator-opendal-$release_version-src/" "$git_branch"
 
+cd dist
 echo "> Generate signature"
-for i in dist/*.tar.gz; do echo $i; gpg --armor --output $i.asc --detach-sig $i ; done
+for i in *.tar.gz; do
+	echo "$i"
+	gpg --armor --output "$i.asc" --detach-sig "$i"
+done
 echo "> Check signature"
-for i in dist/*.tar.gz; do echo $i; gpg --verify $i.asc $i ; done
+for i in *.tar.gz; do
+	echo "$i"
+	gpg --verify "$i.asc" "$i"
+done
 echo "> Generate sha512sum"
-for i in dist/*.tar.gz; do echo $i; sha512sum $i > $i.sha512 ; done
+for i in *.tar.gz; do
+	echo "$i"
+	sha512sum "$i" >"$i.sha512"
+done
 echo "> Check sha512sum"
-for i in dist/*.tar.gz; do echo $i; sha512sum --check $i.sha512; done
+for i in *.tar.gz; do
+	echo "$i"
+	sha512sum --check "$i.sha512"
+done
+
+cd ..
 echo "> Check license"
-docker run -it --rm -v $(pwd):/github/workspace -u $(id -u):$(id -g) ghcr.io/korandoru/hawkeye-native check
+docker run -it --rm -v "$(pwd):/github/workspace" -u "$(id -u):$(id -g)" ghcr.io/korandoru/hawkeye-native check