You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2021/08/10 09:36:30 UTC
svn commit: r49418 - /dev/jackrabbit/check-release.sh
Author: reschke
Date: Tue Aug 10 09:36:30 2021
New Revision: 49418
Log:
JCR-4706: restore GIT support, fix SVN support
Modified:
dev/jackrabbit/check-release.sh
Modified: dev/jackrabbit/check-release.sh
==============================================================================
--- dev/jackrabbit/check-release.sh (original)
+++ dev/jackrabbit/check-release.sh Tue Aug 10 09:36:30 2021
@@ -21,7 +21,8 @@ BASEDIR="`dirname "$0"`"
DEFAULT_PROFILES="pedantic"
PROFILES=${RUN_PROFILES:-$DEFAULT_PROFILES}
MVN_ARGS="-P$PROFILES"
-CLEAN_SVN=".??* .gitignore"
+# Match everything starting with a dot followed by 2 or more characters
+CLEAN_SCM=".??*"
HASHES="sha1"
CLEAN_ZIP=""
@@ -37,7 +38,7 @@ elif [ -z "$3" ]; then
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 --force https://svn.apache.org/repos/asf/jackrabbit/tags/jackrabbit-$VERSION ."
else
COMPONENT="$1"
VERSION="$2"
@@ -48,10 +49,9 @@ else
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,19 +60,24 @@ else
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"
;;
- *)
- 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"
- HASHES="sha1 sha512"
+ "oak")
+ RCDIR="$COMPONENT/$VERSION"
+ SRCZIP="jackrabbit-$COMPONENT-$VERSION-src.zip"
+ SRCDIR="jackrabbit-$COMPONENT-$VERSION"
+ EXPORT_SCM_COMMAND="git clone --depth 1 --branch jackrabbit-$COMPONENT-$VERSION https://gitbox.apache.org/repos/asf/jackrabbit-oak.git ."
+ HASHES="sha1 sha512"
+ ;;
+ *)
+ RCDIR="$COMPONENT/$VERSION"
+ SRCZIP="jackrabbit-$COMPONENT-$VERSION-src.zip"
+ SRCDIR="jackrabbit-$COMPONENT-$VERSION"
+ EXPORT_SCM_COMMAND="svn --quiet export --force https://svn.apache.org/repos/asf/jackrabbit/$COMPONENT/tags/jackrabbit-$COMPONENT-$VERSION ."
+ HASHES="sha1 sha512"
;;
esac
fi
@@ -183,18 +188,20 @@ else
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..."
@@ -211,7 +218,7 @@ set +f # re-enable globbing
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"