From f6dce523e9c5b9ed20635e185646eb0660192e12 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 4 Dec 2022 22:01:55 +0800 Subject: [PATCH 1/5] chore: add ignore files in .gitattributes --- .gitattributes | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitattributes b/.gitattributes index 8e948c534..f48791377 100755 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,14 @@ * text=auto !eol + +# ignored file when package to source.tgz +.gitattributes export-ignore +.gitignore export-ignore +.asf.yaml export-ignore +checkstyle.xml export-ignore +apache-release.sh export-ignore +.licenserc.yaml export-ignore + +# ignored directory +.github/ export-ignore +hugegraph-dist/scripts/ export-ignore +assembly/ export-ignore From 1c616628a5d5b23ce30dc58f07f01b2ce4d4ddd9 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 4 Dec 2022 22:31:15 +0800 Subject: [PATCH 2/5] feat: support release apache package by script --- .gitignore | 5 +- hugegraph-dist/scripts/apache-release.sh | 89 ++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 3 deletions(-) create mode 100755 hugegraph-dist/scripts/apache-release.sh diff --git a/.gitignore b/.gitignore index 1fbbb5aaf..4b93b6e20 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ node_modules upload-files/ demo* gen-java -build ### STS ### .apt_generated @@ -32,9 +31,9 @@ build ### NetBeans ### /nbproject/private/ /nbbuild/ -/dist/ /nbdist/ /.nb-gradle/ +dist/ build/ ### VS Code ### @@ -80,7 +79,7 @@ output/ *.war *.zip *.tar -*.tar.gz +*.tar.gz* tree.txt *.versionsBackup .flattened-pom.xml diff --git a/hugegraph-dist/scripts/apache-release.sh b/hugegraph-dist/scripts/apache-release.sh new file mode 100755 index 000000000..c4342da6b --- /dev/null +++ b/hugegraph-dist/scripts/apache-release.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env 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. +# + +group="hugegraph" +# current repository name +repo="${group}-toolchain" +# release version (input by committer) +release_version=$1 +# git release branch (check it carefully) +git_branch="release-${release_version}" + +release_version=${release_version:?"Please input the release version behind script"} + +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} + +# step1: package the source code +git archive --format=tar.gz \ + --output="dist/apache-${repo}/apache-${repo}-${release_version}-incubating-src.tar.gz" \ + --prefix=apache-${repo}-"${release_version}"-incubating-src/ "${git_branch}" || 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 ${group}-dist/target/apache-${repo}-"${release_version}"-incubating-bin.tar.gz \ + dist/apache-${repo} || exit + +# step3: sign + hash +##### 3.1 sign in source & binary package +gpg --version 1>/dev/null || exit +cd ./dist/apache-${repo} || exit +for i in *.tar.gz; do + echo "$i" && gpg --armor --output "$i".asc --detach-sig "$i" +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 +done + +#### 3.3 check signature & sha512 +for i in *.tar.gz; do + echo "$i" + gpg --verify "$i".asc "$i" || exit +done + +for i in *.tar.gz; do + echo "$i" + shasum -a 512 --check "$i".sha512 || exit +done + +# step4: upload to Apache-SVN +svn_dir="${group}-svn-dev" +cd ../ +rm -rfv ${svn_dir} + +svn co "https://dist.apache.org/repos/dist/dev/incubator/${group}" ${svn_dir} +mkdir -p ${svn_dir}/"${release_version}" +cp -v apache-${repo}/*tar.gz* "${svn_dir}/${release_version}" +cd ${svn_dir} || exit + +# check status first +svn status +svn add "${release_version}" +# check status again +svn status +# commit & push files +svn commit -m "submit files for ${repo} ${release_version}" + +echo "Finished all, please check all steps in script manually again! " From 07aec9e0f43bb4419f04ad35b712bf90bbdad0e8 Mon Sep 17 00:00:00 2001 From: imbajin Date: Wed, 7 Dec 2022 19:16:25 +0800 Subject: [PATCH 3/5] chore: ignore generate package files & update pom --- .gitignore | 1 + hugegraph-dist/pom.xml | 1 - hugegraph-dist/scripts/apache-release.sh | 42 ++++++++++++------------ pom.xml | 41 ++++++++++++++++++++--- 4 files changed, 59 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 4b93b6e20..4e871ffab 100644 --- a/.gitignore +++ b/.gitignore @@ -75,6 +75,7 @@ yarn-error.log* *.pyc # maven ignore +apache-hugegraph-*-incubating-*/ output/ *.war *.zip diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index 7680c6b41..c18ee1f86 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -57,7 +57,6 @@ maven-clean-plugin - 3.0.0 diff --git a/hugegraph-dist/scripts/apache-release.sh b/hugegraph-dist/scripts/apache-release.sh index c4342da6b..fe3abdbbe 100755 --- a/hugegraph-dist/scripts/apache-release.sh +++ b/hugegraph-dist/scripts/apache-release.sh @@ -16,37 +16,37 @@ # limitations under the License. # -group="hugegraph" +GROUP="hugegraph" # current repository name -repo="${group}-toolchain" +REPO="${GROUP}-toolchain" # release version (input by committer) -release_version=$1 +RELEASE_VERSION=$1 # git release branch (check it carefully) -git_branch="release-${release_version}" +GIT_BRANCH="release-${RELEASE_VERSION}" -release_version=${release_version:?"Please input the release version behind script"} +RELEASE_VERSION=${RELEASE_VERSION:?"Please input the release version behind script"} -work_dir=$(cd "$(dirname "$0")" || exit; pwd) -cd "${work_dir}" || exit +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 -rfv dist && mkdir -p dist/apache-${REPO} # step1: package the source code git archive --format=tar.gz \ - --output="dist/apache-${repo}/apache-${repo}-${release_version}-incubating-src.tar.gz" \ - --prefix=apache-${repo}-"${release_version}"-incubating-src/ "${git_branch}" || exit + --output="dist/apache-${REPO}/apache-${REPO}-${RELEASE_VERSION}-incubating-src.tar.gz" \ + --prefix=apache-${REPO}-"${RELEASE_VERSION}"-incubating-src/ "${GIT_BRANCH}" || 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 ${group}-dist/target/apache-${repo}-"${release_version}"-incubating-bin.tar.gz \ - dist/apache-${repo} || exit +cp -v ../../target/apache-${REPO}-incubating-"${RELEASE_VERSION}".tar.gz \ + dist/apache-${REPO} || exit # step3: sign + hash ##### 3.1 sign in source & binary package gpg --version 1>/dev/null || exit -cd ./dist/apache-${repo} || exit +cd ./dist/apache-${REPO} || exit for i in *.tar.gz; do echo "$i" && gpg --armor --output "$i".asc --detach-sig "$i" done @@ -69,21 +69,21 @@ for i in *.tar.gz; do done # step4: upload to Apache-SVN -svn_dir="${group}-svn-dev" +SVN_DIR="${GROUP}-svn-dev" cd ../ -rm -rfv ${svn_dir} +rm -rfv ${SVN_DIR} -svn co "https://dist.apache.org/repos/dist/dev/incubator/${group}" ${svn_dir} -mkdir -p ${svn_dir}/"${release_version}" -cp -v apache-${repo}/*tar.gz* "${svn_dir}/${release_version}" -cd ${svn_dir} || exit +svn co "https://dist.apache.org/repos/dist/dev/incubator/${GROUP}" ${SVN_DIR} +mkdir -p ${SVN_DIR}/"${RELEASE_VERSION}" +cp -v apache-${REPO}/*tar.gz* "${SVN_DIR}/${RELEASE_VERSION}" +cd ${SVN_DIR} || exit # check status first svn status -svn add "${release_version}" +svn add "${RELEASE_VERSION}" # check status again svn status # commit & push files -svn commit -m "submit files for ${repo} ${release_version}" +svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" echo "Finished all, please check all steps in script manually again! " diff --git a/pom.xml b/pom.xml index c17ad1244..f444f6046 100644 --- a/pom.xml +++ b/pom.xml @@ -38,18 +38,51 @@ The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt + https://www.apache.org/licenses/LICENSE-2.0.txt repo - + + + Apache Hugegraph(incubating) + dev-subscribe@hugegraph.apache.org + https://hugegraph.apache.org/ + + + + + + Development List + dev-subscribe@hugegraph.apache.org + dev-unsubscribe@hugegraph.apache.org + dev@hugegraph.incubator.apache.org + + + Commits List + commits-subscribe@hugegraph.apache.org + commits-unsubscribe@hugegraph.apache.org + commits@hugegraph.apache.org + + + Issues List + issues-subscribe@hugegraph.apache.org + issues-unsubscribe@hugegraph.apache.org + issues@hugegraph.apache.org + + + https://github.com/apache/hugegraph-toolchain - https://github.com/apache/hugegraph-toolchain - https://github.com/apache/hugegraph-toolchain + scm:git:https://github.com/apache/hugegraph-toolchain.git + scm:git:https://github.com/apache/hugegraph-toolchain.git + + Github Issues + https://github.com/apache/hugegraph-toolchain/issues + + hugegraph-client hugegraph-loader From d8c16f70002006d993d9fe649a8337b3edb90f00 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sat, 10 Dec 2022 18:35:09 +0800 Subject: [PATCH 4/5] refact: update release script and fix bug --- .gitattributes | 3 ++- .gitignore | 3 +-- hugegraph-dist/scripts/apache-release.sh | 25 +++++++++++++++++------- pom.xml | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.gitattributes b/.gitattributes index f48791377..f906c4f81 100755 --- a/.gitattributes +++ b/.gitattributes @@ -11,4 +11,5 @@ apache-release.sh export-ignore # ignored directory .github/ export-ignore hugegraph-dist/scripts/ export-ignore -assembly/ export-ignore +# only exclude the root +/assembly/ export-ignore diff --git a/.gitignore b/.gitignore index 4e871ffab..fe63f8b6f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ target/ **.db logs/ ui -node_modules +node_modules/ upload-files/ demo* gen-java @@ -22,7 +22,6 @@ gen-java .svn ### IntelliJ IDEA ### -.idea .idea/ *.iws *.iml diff --git a/hugegraph-dist/scripts/apache-release.sh b/hugegraph-dist/scripts/apache-release.sh index fe3abdbbe..62f797c55 100755 --- a/hugegraph-dist/scripts/apache-release.sh +++ b/hugegraph-dist/scripts/apache-release.sh @@ -21,6 +21,8 @@ GROUP="hugegraph" REPO="${GROUP}-toolchain" # release version (input by committer) RELEASE_VERSION=$1 +USERNAME=$2 +PASSWORD=$3 # git release branch (check it carefully) GIT_BRANCH="release-${RELEASE_VERSION}" @@ -34,9 +36,12 @@ echo "In the work dir: $(pwd)" rm -rfv dist && mkdir -p dist/apache-${REPO} # step1: package the source code +cd ../../ || exit git archive --format=tar.gz \ - --output="dist/apache-${REPO}/apache-${REPO}-${RELEASE_VERSION}-incubating-src.tar.gz" \ - --prefix=apache-${REPO}-"${RELEASE_VERSION}"-incubating-src/ "${GIT_BRANCH}" || exit + --output="${GROUP}-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) @@ -73,17 +78,23 @@ SVN_DIR="${GROUP}-svn-dev" cd ../ rm -rfv ${SVN_DIR} +##### 4.1 pull from remote & copy files svn co "https://dist.apache.org/repos/dist/dev/incubator/${GROUP}" ${SVN_DIR} mkdir -p ${SVN_DIR}/"${RELEASE_VERSION}" cp -v apache-${REPO}/*tar.gz* "${SVN_DIR}/${RELEASE_VERSION}" cd ${SVN_DIR} || exit -# check status first +##### 4.2 check status first svn status -svn add "${RELEASE_VERSION}" +svn add --parents "${RELEASE_VERSION}"/apache-${REPO}-* # check status again svn status -# commit & push files -svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" -echo "Finished all, please check all steps in script manually again! " +##### 4.3 commit & push files +if [ "$USERNAME" = "" ]; then + svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" +else + svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" --username "${USERNAME}" --password "${PASSWORD}" +fi + +echo "Finished all, please check all steps in script manually again!" diff --git a/pom.xml b/pom.xml index f444f6046..7b9758df7 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ - Development List + Developer List dev-subscribe@hugegraph.apache.org dev-unsubscribe@hugegraph.apache.org dev@hugegraph.incubator.apache.org From 675e7f49277d0e49bb0143de36fd880f36026a57 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sat, 10 Dec 2022 23:13:35 +0800 Subject: [PATCH 5/5] fix gpg signature error & remove redundant configs --- hugegraph-client/pom.xml | 104 ++++--------- hugegraph-hubble/hubble-be/pom.xml | 1 - hugegraph-hubble/hubble-dist/pom.xml | 1 + hugegraph-hubble/pom.xml | 2 +- hugegraph-loader/pom.xml | 164 ++++++++++---------- hugegraph-tools/pom.xml | 89 +++++------ pom.xml | 222 ++++++++++++++------------- 7 files changed, 269 insertions(+), 314 deletions(-) diff --git a/hugegraph-client/pom.xml b/hugegraph-client/pom.xml index 150196284..ae670bf7a 100644 --- a/hugegraph-client/pom.xml +++ b/hugegraph-client/pom.xml @@ -28,14 +28,13 @@ jar ${project.artifactId} - https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-client + https://github.com/apache/hugegraph-toolchain/tree/master/hugegraph-client hugegraph-client is a Java-written client of HugeGraph, providing operations of graph, schema, gremlin, variables and traversals etc. - 1.0.0 3.0.3 2.8.47 @@ -44,7 +43,6 @@ org.apache.hugegraph hugegraph-common - ${hugegraph.common.version} org.lz4 @@ -66,35 +64,29 @@ - - maven-compiler-plugin - 3.1 - - ${compiler.source} - ${compiler.target} - - 500 - - - -Xlint:unchecked - - - - + + + + + + + + + + + + + + org.apache.maven.plugins maven-jar-plugin - 2.4 true - - false - - - true - + false + true - - --pinentry-mode - loopback - - - + + + + + + + + + + + + diff --git a/hugegraph-hubble/hubble-be/pom.xml b/hugegraph-hubble/hubble-be/pom.xml index 590e8a834..781b02f11 100644 --- a/hugegraph-hubble/hubble-be/pom.xml +++ b/hugegraph-hubble/hubble-be/pom.xml @@ -90,7 +90,6 @@ org.apache.hugegraph hugegraph-common - ${project.version} diff --git a/hugegraph-hubble/hubble-dist/pom.xml b/hugegraph-hubble/hubble-dist/pom.xml index 281e2d603..5ad3343f4 100644 --- a/hugegraph-hubble/hubble-dist/pom.xml +++ b/hugegraph-hubble/hubble-dist/pom.xml @@ -112,6 +112,7 @@ *.tar.gz ${final.name}/** + .flattened-pom.xml false diff --git a/hugegraph-hubble/pom.xml b/hugegraph-hubble/pom.xml index d8cba158d..63188761b 100644 --- a/hugegraph-hubble/pom.xml +++ b/hugegraph-hubble/pom.xml @@ -28,7 +28,7 @@ pom ${project.artifactId} - https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-hubble + https://github.com/apache/hugegraph-toolchain/tree/master/hugegraph-hubble hugegraph-hubble is a graph management and analysis platform that provides features: graph data load, schema management, graph relationship analysis and graphical display. diff --git a/hugegraph-loader/pom.xml b/hugegraph-loader/pom.xml index 419ec33c9..256cd418c 100644 --- a/hugegraph-loader/pom.xml +++ b/hugegraph-loader/pom.xml @@ -25,7 +25,7 @@ hugegraph-loader - + jar ${project.artifactId} https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-loader @@ -546,58 +546,58 @@ - release + apache-release - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - - jar - - - - - - -Xdoclint:none - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - - - - - --pinentry-mode - loopback - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -605,19 +605,19 @@ - - maven-compiler-plugin - - ${compiler.source} - ${compiler.target} - - 500 - - - -Xlint:unchecked - - - + + + + + + + + + + + + + org.apache.maven.plugins maven-assembly-plugin @@ -660,24 +660,24 @@ - - maven-clean-plugin - - - - ${project.basedir} - - *.tar.gz - ${final.name}/** - - false - - - ${final.name} - - - - + + + + + + + + + + + + + + + + + + org.jacoco jacoco-maven-plugin diff --git a/hugegraph-tools/pom.xml b/hugegraph-tools/pom.xml index b6bfc9a4b..6bd821064 100644 --- a/hugegraph-tools/pom.xml +++ b/hugegraph-tools/pom.xml @@ -27,7 +27,7 @@ hugegraph-tools jar - https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-tools + https://github.com/apache/hugegraph-toolchain/tree/master/hugegraph-tools ${project.artifactId} @@ -38,33 +38,22 @@ bash 4.12 yyyy-MM-dd HH:mm:ssZ - 1.0.0 1.72 3.1.1 25.1-jre - - - - junit - junit - ${junit.version} - test - - - - junit junit + ${junit.version} test org.apache.hugegraph hugegraph-client - ${hugegraph-client-version} + ${revision} com.fasterxml.jackson.core @@ -188,16 +177,15 @@ - - org.apache.maven.plugins - maven-compiler-plugin - 3.7.0 - - ${java.version} - ${java.version} - ${project.build.sourceEncoding} - - + + + + + + + + + org.apache.maven.plugins maven-assembly-plugin @@ -240,32 +228,31 @@ - - maven-clean-plugin - 3.0.0 - - - - ${project.basedir} - - *.tar.gz - ${final.name}/** - - false - - - ${final.name} - - - - + + + + + + + + + + + + + + + + + + - release + apache-release @@ -294,13 +281,13 @@ - - maven-release-plugin - - - -Prelease - - + + + + + + + maven-javadoc-plugin diff --git a/pom.xml b/pom.xml index 7b9758df7..09220c8d3 100644 --- a/pom.xml +++ b/pom.xml @@ -116,93 +116,106 @@ ${project.name} ${project.version} 2.2.3 + 1.0.0 - - - - - - - - - - - - - - - - - - - - - - - + + + + + org.apache.hugegraph + hugegraph-common + ${hugegraph.common.version} + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + apache-release + + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + none + false + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + + --pinentry-mode + loopback + + + + + + + @@ -239,10 +252,10 @@ maven-compiler-plugin - 3.1 ${compiler.source} ${compiler.target} + ${project.build.sourceEncoding} 500 @@ -298,25 +311,25 @@ - - - - - - - - - - - - - - - - - - - + + maven-clean-plugin + + + + ${project.basedir} + + *.tar.gz + ${final.name}/** + .flattened-pom.xml + + false + + + ${final.name} + + + + @@ -416,7 +429,6 @@ org.apache.rat apache-rat-plugin - 0.15 **/*.versionsBackup