This is an automated email from the ASF dual-hosted git repository. zhaocong pushed a commit to branch fix_release_shell in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-computer.git
commit 1aa3ed7f8f3f04e06529c8477bf28cac3818519c Author: Cong Zhao <[email protected]> AuthorDate: Sat Dec 17 22:18:29 2022 +0800 fix: release shell & enhance code (#220) * fix release shell * chore: print hash in script and exit if upload failed Co-authored-by: imbajin <[email protected]> (cherry picked from commit 550c4b8a538b5eac2fef7d95c42b2f49610675b9) --- .asf.yaml | 2 +- computer-dist/scripts/apache-release.sh | 23 +++++++++------ pom.xml | 51 +++++++++++++++++---------------- 3 files changed, 41 insertions(+), 35 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index 3f1d59ef..3449c111 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -24,7 +24,7 @@ github: # Enable projects for project management boards projects: true description: HugeGraph Computer - A distributed graph processing system for hugegraph (OLAP) - homepage: https://hugegraph.apache.org/ + homepage: https://hugegraph.apache.org/docs/quickstart/hugegraph-computer/ del_branch_on_merge: true #labels: diff --git a/computer-dist/scripts/apache-release.sh b/computer-dist/scripts/apache-release.sh index fd10f94e..bbff1624 100755 --- a/computer-dist/scripts/apache-release.sh +++ b/computer-dist/scripts/apache-release.sh @@ -28,20 +28,23 @@ GIT_BRANCH="release-${RELEASE_VERSION}" RELEASE_VERSION=${RELEASE_VERSION:?"Please input the release version behind script"} -WORK_DIR=$(cd "$(dirname "$0")" || exit; pwd) +WORK_DIR=$( + cd "$(dirname "$0")" || exit + pwd +) cd "${WORK_DIR}" || exit echo "In the work dir: $(pwd)" # clean old dir then build a new one -rm -rfv dist && mkdir -p dist/apache-${REPO} +rm -rf dist && mkdir -p dist/apache-${REPO} # step1: package the source code -cd ../.../ || exit +cd ../../ || exit git archive --format=tar.gz \ --output="computer-dist/scripts/dist/apache-${REPO}/apache-${REPO}-incubating-${RELEASE_VERSION}-src.tar.gz" \ --prefix="apache-${REPO}-incubating-${RELEASE_VERSION}-src/" "${GIT_BRANCH}" || exit - cd - || exit + # step2: copy the binary file (Optional) # Note: it's optional for project to generate binary package (skip this step if not need) cp -v ../../target/apache-${REPO}-incubating-"${RELEASE_VERSION}".tar.gz \ @@ -58,10 +61,11 @@ done ##### 3.2 Generate SHA512 file shasum --version 1>/dev/null || exit for i in *.tar.gz; do - echo "$i" && shasum -a 512 "$i" >"$i".sha512 + shasum -a 512 "$i" | tee "$i".sha512 done #### 3.3 check signature & sha512 +echo "#### start to check signature & hashcode ####" for i in *.tar.gz; do echo "$i" gpg --verify "$i".asc "$i" || exit @@ -74,8 +78,8 @@ done # step4: upload to Apache-SVN SVN_DIR="${GROUP}-svn-dev" -cd ../ -rm -rfv ${SVN_DIR} +cd ../ || exit +rm -rf ${SVN_DIR} ##### 4.1 pull from remote & copy files svn co "https://dist.apache.org/repos/dist/dev/incubator/${GROUP}" ${SVN_DIR} @@ -91,9 +95,10 @@ svn status ##### 4.3 commit & push files if [ "$USERNAME" = "" ]; then - svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" + svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" || exit else - svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" --username "${USERNAME}" --password "${PASSWORD}" + svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" \ + --username "${USERNAME}" --password "${PASSWORD}" || exit fi echo "Finished all, please check all steps in script manually again!" diff --git a/pom.xml b/pom.xml index e5f59cac..9643f444 100644 --- a/pom.xml +++ b/pom.xml @@ -44,37 +44,37 @@ </licenses> <developers> - <developer> - <id>Apache Hugegraph(incubating)</id> - <email>[email protected]</email> - <url>https://hugegraph.apache.org/</url> - </developer> + <developer> + <id>Apache Hugegraph(Incubating)</id> + <email>[email protected]</email> + <url>https://hugegraph.apache.org/</url> + </developer> </developers> <mailingLists> - <mailingList> - <name>Development List</name> - <subscribe>[email protected]</subscribe> - <unsubscribe>[email protected]</unsubscribe> - <post>[email protected]</post> - </mailingList> - <mailingList> - <name>Commits List</name> - <subscribe>[email protected]</subscribe> - <unsubscribe>[email protected]</unsubscribe> - <post>[email protected]</post> - </mailingList> - <mailingList> - <name>Issues List</name> - <subscribe>[email protected]</subscribe> - <unsubscribe>[email protected]</unsubscribe> - <post>[email protected]</post> - </mailingList> + <mailingList> + <name>Development List</name> + <subscribe>[email protected]</subscribe> + <unsubscribe>[email protected]</unsubscribe> + <post>[email protected]</post> + </mailingList> + <mailingList> + <name>Commits List</name> + <subscribe>[email protected]</subscribe> + <unsubscribe>[email protected]</unsubscribe> + <post>[email protected]</post> + </mailingList> + <mailingList> + <name>Issues List</name> + <subscribe>[email protected]</subscribe> + <unsubscribe>[email protected]</unsubscribe> + <post>[email protected]</post> + </mailingList> </mailingLists> <issueManagement> - <system>Github Issues</system> - <url>https://github.com/apache/hugegraph-computer/issues</url> + <system>Github Issues</system> + <url>https://github.com/apache/hugegraph-computer/issues</url> </issueManagement> <scm> @@ -527,6 +527,7 @@ </build> </profile> </profiles> + <repositories> <repository> <id>staged-releases</id>
