Index: check-release.sh =================================================================== --- check-release.sh (revision 48843) +++ check-release.sh (working copy) @@ -21,7 +21,7 @@ DEFAULT_PROFILES="pedantic" PROFILES=${RUN_PROFILES:-$DEFAULT_PROFILES} MVN_ARGS="-P$PROFILES" -CLEAN_SVN=".??* .gitignore" +CLEAN_SCM=".??* .gitignore" HASHES="sha1" CLEAN_ZIP="" @@ -37,7 +37,7 @@ SRCZIP="jackrabbit-$VERSION-src.zip" SRCDIR="jackrabbit-$VERSION" HASHES="sha1 sha512" - TAGURL="https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-$VERSION" + EXPORT_SCM_COMMAND="svn --quiet export https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-$VERSION" else COMPONENT="$1" VERSION="$2" @@ -48,10 +48,9 @@ RCDIR="$COMPONENT/$VERSION" SRCZIP="$COMPONENT-$VERSION-source-release.zip" SRCDIR="filevault-package-maven-plugin-$VERSION" - # https://github.blog/2011-10-20-improved-subversion-client-support/ - TAGURL="https://github.com/apache/jackrabbit-filevault-package-maven-plugin/tags/$COMPONENT-$VERSION" + EXPORT_SCM_COMMAND="git clone --depth 1 --branch $COMPONENT-$VERSION https://gitbox.apache.org/repos/asf/jackrabbit-filevault-package-maven-plugin.git ." MVN_ARGS="" - CLEAN_SVN=".gitignore .gitattributes" + CLEAN_SCM=".gitignore .gitattributes .git" HASHES="sha512" CLEAN_ZIP="DEPENDENCIES" # the DEPENDENCIES are automatically generated during the release and are not in svn ;; @@ -60,11 +59,9 @@ RCDIR="filevault/$VERSION" SRCZIP="$COMPONENT-$VERSION-src.zip" SRCDIR="$COMPONENT-$VERSION" - # https://github.blog/2011-10-20-improved-subversion-client-support/ - TAGURL="https://github.com/apache/jackrabbit-filevault/tags/$COMPONENT-$VERSION" + EXPORT_SCM_COMMAND="git clone --depth 1 --branch $COMPONENT-$VERSION https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git ." MVN_ARGS="" - CLEAN_SVN=".gitignore .gitattributes" - CLEAN_ZIP="" + CLEAN_SCM=".gitignore .gitattributes .git" HASHES="sha1 sha512" ;; "oak") @@ -71,9 +68,9 @@ RCDIR="$COMPONENT/$VERSION" SRCZIP="jackrabbit-$COMPONENT-$VERSION-src.zip" SRCDIR="jackrabbit-$COMPONENT-$VERSION" - # https://github.blog/2011-10-20-improved-subversion-client-support/ - TAGURL="https://github.com/apache/jackrabbit-oak/tags/jackrabbit-$COMPONENT-$VERSION" - CLEAN_SVN=".gitignore .gitattributes" + EXPORT_SCM_COMMAND="git clone --depth 1 --branch jackrabbit-$COMPONENT-$VERSION https://gitbox.apache.org/repos/asf/jackrabbit-oak.git ." + # everything starting with a dot is excluded (https://github.com/apache/jackrabbit-oak/blob/trunk/assembly.xml) + CLEAN_SCM=".gitignore .gitattributes .git .travis.yml .asf.yaml" HASHES="sha1 sha512" ;; *) @@ -80,7 +77,7 @@ RCDIR="$COMPONENT/$VERSION" SRCZIP="jackrabbit-$COMPONENT-$VERSION-src.zip" SRCDIR="jackrabbit-$COMPONENT-$VERSION" - TAGURL="https://svn.apache.org/repos/asf/jackrabbit/$COMPONENT/tags/jackrabbit-$COMPONENT-$VERSION" + EXPORT_SCM_COMMAND="svn --quiet export https://svn.apache.org/repos/asf/jackrabbit/$COMPONENT/tags/jackrabbit-$COMPONENT-$VERSION" HASHES="sha1 sha512" ;; esac @@ -192,18 +189,20 @@ fi info "" -info "5. Compare svn tag with src zip contents" +info "5. Compare SCM tag with src zip contents" info "" -info " Exporting $TAGURL..." +info " Exporting SCM tag..." WORKDIR="$BASEDIR/target/$SRCDIR" test -e "$WORKDIR" && rm -rf "$WORKDIR" -mkdir -p "$WORKDIR/svn" -SVNDIR="$WORKDIR/svn/$SRCDIR" -svn --quiet export "$TAGURL" "$SVNDIR" 2>> "$LOGFILE" 1>&2 || exit 1 +SCMDIR="$WORKDIR/scm/$SRCDIR" +mkdir -p "$SCMDIR" +cd "$SCMDIR" +eval "$EXPORT_SCM_COMMAND" 2>> "../../../../$LOGFILE" 1>&2 || exit 1 +cd "../../../.." set -f # disable globbing during pattern loop -for PATTERN in $CLEAN_SVN; do - echo "Cleaning $PATTERN from $SVNDIR" >> "$LOGFILE" - find "$SVNDIR" -name "$PATTERN" -print0 | xargs -0 rm -rfv >> "$LOGFILE" +for PATTERN in $CLEAN_SCM; do + echo "Cleaning $PATTERN from $SCMDIR" >> "$LOGFILE" + find "$SCMDIR" -name "$PATTERN" -print0 | xargs -0 rm -rfv >> "$LOGFILE" done info " Unzipping $SRCZIP..." @@ -220,7 +219,7 @@ info " Comparing sources..." info "" DIFFOUT="$WORKDIR/diff-output.txt" -if ! diff -b -r "$SVNDIR" "$ZIPDIR" > "$DIFFOUT" 2>> "$LOGFILE"; then +if ! diff -b -r "$SCMDIR" "$ZIPDIR" > "$DIFFOUT" 2>> "$LOGFILE"; then if [ -s "$DIFFOUT" ]; then cat "$DIFFOUT" >> "$LOGFILE" error " NOT OK: Tagged sources are different from those in the archive"