diff --git a/scripts/create-rc.sh b/scripts/create-rc.sh new file mode 100755 index 0000000..56e043c --- /dev/null +++ b/scripts/create-rc.sh @@ -0,0 +1,11 @@ +set -e + +if [ -z "$VERSION" ] || [ -z "$RC" ] +then + echo "First set the VERSION and RC environment variables." + exit 1 +fi + +git tag -s "v$VERSION-rc.$RC" -m "v$VERSION-rc.$RC" +git push origin tag "v$VERSION-rc.$RC" +make distsign diff --git a/scripts/obtain-rc.sh b/scripts/obtain-rc.sh new file mode 100755 index 0000000..b365365 --- /dev/null +++ b/scripts/obtain-rc.sh @@ -0,0 +1,12 @@ +set -e + +if [ -z "$VERSION" ] || [ -z "$RC" ] +then + echo "First set the VERSION and RC environment variables." + exit 1 +fi + +curl -O https://dist.apache.org/repos/dist/dev/incubator/annotator/source/$VERSION/rc.$RC/apache-annotator-$VERSION-rc.$RC-incubating.tar.gz +curl -O https://dist.apache.org/repos/dist/dev/incubator/annotator/source/$VERSION/rc.$RC/apache-annotator-$VERSION-rc.$RC-incubating.tar.gz.asc +curl -O https://dist.apache.org/repos/dist/dev/incubator/annotator/source/$VERSION/rc.$RC/apache-annotator-$VERSION-rc.$RC-incubating.tar.gz.sha256 +curl -O https://dist.apache.org/repos/dist/dev/incubator/annotator/source/$VERSION/rc.$RC/apache-annotator-$VERSION-rc.$RC-incubating.tar.gz.sha512 diff --git a/scripts/publish-rc.sh b/scripts/publish-rc.sh new file mode 100755 index 0000000..836e60a --- /dev/null +++ b/scripts/publish-rc.sh @@ -0,0 +1,24 @@ +set -e + +if [ -z "$VERSION" ] || [ -z "$RC" ] +then + echo "First set the VERSION and RC environment variables." + exit 1 +fi +if [ -z "$APACHE_USERNAME" ] +then + echo "First set the APACHE_USERNAME environment variable." + exit 1 +fi + +svn co https://dist.apache.org/repos/dist/dev/incubator/annotator/source dev +mkdir -p dev/$VERSION/rc.$RC +cp apache-annotator-$VERSION-rc.$RC-incubating.tar.gz* dev/$VERSION/rc.$RC +if [ $RC == "1" ] +then + svn add dev/$VERSION +else + svn add dev/$VERSION/rc.$RC +fi +svn propset svn:mime-type text/plain dev/$VERSION/rc.$RC/*.gz.asc dev/$VERSION/rc.$RC/*.gz.sha* +svn ci --username $APACHE_USERNAME -m "Add Annotator $VERSION rc.$RC to dev tree" dev diff --git a/scripts/verify-rc.sh b/scripts/verify-rc.sh new file mode 100755 index 0000000..b5dc131 --- /dev/null +++ b/scripts/verify-rc.sh @@ -0,0 +1,47 @@ +set -e + +if [ -z "$VERSION" ] || [ -z "$RC" ] +then + echo "First set the VERSION and RC environment variables." + exit 1 +fi + +gpg --verify apache-annotator-*.tar.gz.asc + +sha256sum --check apache-annotator-*.tar.gz.sha256 +sha512sum --check apache-annotator-*.tar.gz.sha512 + +tar xzf apache-annotator-$VERSION-rc.$RC-incubating.tar.gz +cd apache-annotator-$VERSION-incubating + +git remote show origin + +git fetch --unshallow origin tag v$VERSION-rc.$RC + +git describe + +git status --ignored + +# We need Apache RAT. +RAT_VERSION="0.13" +RAT_JAR_FOLDER="$HOME/.apache-rat-used-for-verifying-annotator" +RAT_JAR_FILE_PATH="$RAT_JAR_FOLDER/apache-rat-${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar" +if [ ! -f "$RAT_JAR_FILE_PATH" ] +then + read -p "Did not find Apache RAT at $RAT_JAR_FILE_PATH. Download it? [y/N] " response + if [[ $response =~ (Y|y|YES|Yes|yes) ]] + then + wget -c -P "$RAT_JAR_FOLDER" "https://dlcdn.apache.org/creadur/apache-rat-${RAT_VERSION}/apache-rat-${RAT_VERSION}-bin.zip" + unzip -d "$RAT_JAR_FOLDER" "$RAT_JAR_FOLDER/apache-rat-${RAT_VERSION}-bin.zip" + else + exit 0 + fi +fi +java -jar "$RAT_JAR_FILE_PATH" -E .ratignore -d . + +make +yarn build +make check + +yarn clean +git status --ignored