Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scripts to (semi)automate release steps #116

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions scripts/create-rc.sh
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions scripts/obtain-rc.sh
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions scripts/publish-rc.sh
Original file line number Diff line number Diff line change
@@ -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
52 changes: 52 additions & 0 deletions scripts/verify-rc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
set -e

#VERSION=0.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove these comments.

#RC=1

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

sleep 5

sha256sum --check apache-annotator-*.tar.gz.sha256
sha512sum --check apache-annotator-*.tar.gz.sha512

sleep 5

tar xzf apache-annotator-$VERSION-rc.$RC-incubating.tar.gz
cd apache-annotator-$VERSION-incubating

git remote show origin

sleep 5

git fetch --unshallow origin tag v$VERSION-rc.$RC

git describe

sleep 5

git status --ignored

sleep 5

# Expects Apache RAT 0.13 jar to be present in home directory
# wget https://dlcdn.apache.org/creadur/apache-rat-0.13/apache-rat-0.13-bin.zip
# unzip apache-rat-0.13-bin.zip
java -jar ~/apache-rat-0.13.jar -E .ratignore -d .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should just download rat here?


sleep 5

make
yarn build
make check

sleep 5

yarn clean
git status --ignored