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 06:57:22 UTC

[incubator-opendal] branch add-check-script created (now e5ef117e)

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

xuanwo pushed a change to branch add-check-script
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


      at e5ef117e ci: Add check scripts

This branch includes the following new commits:

     new e5ef117e ci: Add check scripts

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-opendal] 01/01: ci: Add check scripts

Posted by xu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e5ef117e374958baccfdac4aa06fda8592768cde
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Thu Mar 16 14:57:09 2023 +0800

    ci: Add check scripts
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 scripts/README.md                | 52 ++++++++++++++++++++++++++++++++++++++++
 scripts/{release.sh => check.sh} | 27 ++++++++++-----------
 scripts/release.sh               |  4 +++-
 3 files changed, 67 insertions(+), 16 deletions(-)

diff --git a/scripts/README.md b/scripts/README.md
new file mode 100644
index 00000000..ecf47feb
--- /dev/null
+++ b/scripts/README.md
@@ -0,0 +1,52 @@
+# OpenDAL Scripts
+
+This module provides scipts to make maintainers lives easier. OpenDAL users don't need to care about this folder.
+
+## Release
+
+```shell
+OPENDAL_VERSION=0.30.2 OPENDAL_VERSION_RC=rc1 ./scripts/release.sh
+```
+
+> Before running release, please make sure you have bump all versions.
+
+## Check
+
+```shell
+OPENDAL_VERSION=0.30.2 OPENDAL_VERSION_RC=rc1 ./scripts/check.sh
+```
+
+> Before running the check, please ensure that you have completed the following preparations.
+
+### Preparations
+
+Import gpg key
+
+```shell
+$ curl https://downloads.apache.org/incubator/opendal/KEYS > KEYS # Download KEYS
+$ gpg --import KEYS # Import KEYS to local
+```
+
+Trust the public key
+
+```shell
+$ gpg --edit-key xxxxxxxxxx #KEY user used in this version
+gpg (GnuPG) 2.2.21; Copyright (C) 2020 Free Software Foundation, Inc.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Secret key is available.
+gpg> trust #trust
+Please decide how far you trust this user to correctly verify other users' keys
+(by looking at passports, checking fingerprints from different sources, etc.)
+
+  1 = I don't know or won't say
+  2 = I do NOT trust
+  3 = I trust marginally
+  4 = I trust fully
+  5 = I trust ultimately
+  m = back to the main menu
+
+Your decision? 5 #choose 5
+Do you really want to set this key to ultimate trust? (y/N) y  #choose y
+```
diff --git a/scripts/release.sh b/scripts/check.sh
old mode 100755
new mode 100644
similarity index 64%
copy from scripts/release.sh
copy to scripts/check.sh
index c363c67a..2a4ec6b8
--- a/scripts/release.sh
+++ b/scripts/check.sh
@@ -28,25 +28,22 @@ fi
 
 # tar source code
 release_version=${OPENDAL_VERSION}
+# rc versions
+rc_version=${OPENDAL_VERSION_RC:rc1}
 # Corresponding git repository branch
-git_branch=release-${OPENDAL_VERSION}-rc1
+git_branch=release-${release_version}-${rc_version}
 
-rm -rf dist
-mkdir -p dist/
+echo "> Checkout release"
+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 "> Checkout version 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
-
-echo "> Generate signature"
-for i in dist/*.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
-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; gpg --verify $i.asc $i ; 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
+
+echo "> Check content"
+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
diff --git a/scripts/release.sh b/scripts/release.sh
index c363c67a..9eb1b786 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -28,8 +28,10 @@ fi
 
 # tar source code
 release_version=${OPENDAL_VERSION}
+# rc versions
+rc_version=${OPENDAL_VERSION_RC:rc1}
 # Corresponding git repository branch
-git_branch=release-${OPENDAL_VERSION}-rc1
+git_branch=release-${release_version}-${rc_version}
 
 rm -rf dist
 mkdir -p dist/