Cutting an ANTLR Release
This pages out of date as we have moved back to a maven release mechanism
Maven release
mvn deploy -DskipTests
mvn release:prepare
mvn release:perform
Now, go here:
https://oss.sonatype.org/#welcome
and on the left click "Staging Repositories". You click the staging repo and close it, then you refresh, click it and release it. It's done when you see it here:
http://repo1.maven.org/maven2/org/antlr/antlr4-runtime/
Copy to antlr site and update download/index.html
cp ~/.m2/repository/org/antlr/antlr4-runtime/4.5.1/antlr4-runtime-4.5.1.jar ~/antlr/sites/website-antlr4/download/antlr-runtime-4.5.1.jar
cp ~/.m2/repository/org/antlr/antlr4/4.5.1/antlr4-4.5.1.jar ~/antlr/sites/website-antlr4/download/antlr-4.5.1-complete.jar
cd ~/antlr/sites/website-antlr4/download
git add antlr-4.5.1-complete.jar
git add antlr-runtime-4.5.1.jar
git commit -a -m 'add 4.5.1 jars'
git push origin gh-pages
Update on site:
- download.html
- index.html
- scripts/topnav.js
Targets
cd runtime/JavaScript/src
zip -r /tmp/antlr-javascript-runtime-4.5.1.zip antlr4
cp /tmp/antlr-javascript-runtime-4.5.1.zip ~/antlr/sites/website-antlr4/download
# git add, commit, push
cd ~/antlr/code/antlr4/runtime/CSharp/runtime/CSharp
# kill previous ones manually as "xbuild /t:Clean" didn't seem to do it
rm Antlr4.Runtime/bin/net20/Release/Antlr4.Runtime.dll
rm Antlr4.Runtime/obj/net20/Release/Antlr4.Runtime.dll
# build
xbuild /p:Configuration=Release Antlr4.Runtime/Antlr4.Runtime.mono.csproj
# zip it up to get a version number on zip filename
zip --junk-paths /tmp/antlr-csharp-runtime-4.5.1.zip Antlr4.Runtime/bin/net35/Release/Antlr4.Runtime.dll
cp /tmp/antlr-csharp-runtime-4.5.1.zip ~/antlr/sites/website-antlr4/download
pushd ~/antlr/sites/website-antlr4/download
git add antlr-csharp-runtime-4.5.1.zip
git add antlr-javascript-runtime-4.5.1.zip
git commit -a -m 'update C#, JS runtimes'
git push origin gh-pages
popd
The Python targets get deployed with deploy.py:
cd ~/antlr/code/antlr4/runtime/Python2
# assume you have ~/.pypirc set up
python setup.py register -r pypi
python setup.py sdist bdist_wininst upload -r pypi
cd ~/antlr/code/antlr4/runtime/Python3
# assume you have ~/.pypirc set up
python setup.py register -r pypi
python setup.py sdist bdist_wininst upload -r pypi
Add links to the artifacts from download.html
Update javadoc for runtime and tool
cd ~/antlr/code/antlr4
./bild.py mkdoc
cd ~/antlr/sites/website-antlr4/api
git checkout gh-pages
git pull origin gh-pages
cd Java
jar xvf ~/.m2/repository/org/antlr/antlr4-runtime/4.5.1/antlr4-runtime-4.5.1-javadoc.jar
cd ../JavaTool
jar xvf ~/.m2/repository/org/antlr/antlr4/4.5.1/antlr4-4.5.1-javadoc.jar
git commit -a -m 'freshen api doc'
git push origin gh-pages
OLD STUFF
- create a release candidate tag 4.x-rc-1 or full 4.5 tag
git tag -a 4.5 -m 'ANTLR final release 4.5'
git push origin 4.5
-
create a pre-release or full release at github; Example 4.5-rc-1
-
make sure
bilder.py
is right version before calling./bild.py
; you can just remove it and it will bootstrap by downloading itself again.
Bump version to 4.x
Edit the repository looking for 4.5 or whatever and update it. The version will be 4.5 but when copying the jars to the website below you will rename them to be a release candidate. Bump version in the following files:
- antlr4-maven-plugin/pom.xml
- bild.py
- runtime/Java/pom.xml
- runtime/Java/src/org/antlr/v4/runtime/RuntimeMetaData.java
- tool/pom.xml
- ../antlr4-python2/setup.py
- ../antlr4-python2/src/antlr4/Recognizer.py
- ../antlr4-python2/tool/src/org/antlr/v4/codegen/Python2Target.java
- ../antlr4-python3/setup.py
- ../antlr4-python3/src/antlr4/Recognizer.py
- ../antlr4-python3/tool/src/org/antlr/v4/codegen/Python3Target.java
- ../antlr4-csharp/runtime/CSharp/Antlr4.Runtime/Properties/AssemblyInfo.cs
- ../antlr4-csharp/tool/src/org/antlr/v4/codegen/CSharpTarget.java
- ../antlr4-javascript/src/antlr4/package.json
- ../antlr4-javascript/src/antlr4/Recognizer.js
- ../antlr4-javascript/tool/src/org/antlr/v4/codegen/JavaScriptTarget.java
Here is a simple script to display any line from the critical files with 4.5
in it:
find antlr4* -type f -exec grep -l '4\.5' {} \;
Commit to repository.
Make ANTLR Java jars and deploy
Make jars, copy to download of website-antlr4 to deploy
cd ~/antlr/code/antlr4
git pull origin master
git pull upstream master
./bild.py mkjar
cp dist/antlr4-4.5-complete.jar ~/antlr/sites/website-antlr4/download/antlr-4.5-complete.jar
cp dist/antlr4-4.5.jar ~/antlr/sites/website-antlr4/download/antlr-runtime-4.5.jar
pushd ~/antlr/sites/website-antlr4/download
git add antlr-4.5-complete.jar
git add antlr-runtime-4.5.jar
popd
Add link to download/index.html
.
We need to also get the Java files over to sonatype for SNAPSHOT
s. Go to Deploying ANTLR mvn artifacts.
Make/Deploy JavaScript, Python, C# artifacts
You can make the individual targets if you want, but it's easiest to simply say
cd ~/antlr/code/antlr4
./bild.py target_artifacts
Gives output like the following:
target target_artifacts
Generated dist/antlr-javascript-runtime-4.5.zip
Generated dist/antlr4-python2-runtime-4.5.tar.gz
Generated dist/antlr4-python3-runtime-4.5.tar.gz
Generated dist/antlr-csharp-runtime-4.5.zip
bild succeeded
Then just copy the two zips, that are downloads instead of deployed on another site, over into the download area:
cp dist/antlr-csharp-runtime-4.5.zip ~/antlr/sites/website-antlr4/download
cp dist/antlr-javascript-runtime-4.5.zip ~/antlr/sites/website-antlr4/download
pushd ~/antlr/sites/website-antlr4/download
git add antlr-csharp-runtime-4.5.zip
git add antlr-javascript-runtime-4.5.zip
popd
The Python targets get deployed with deploy.py
:
cd ~/antlr/code/antlr4
./deploy.py pypi
Add links to the artifacts from download.html
Update javadoc for runtime and tool
cd ~/antlr/code/antlr4
./bild.py mkdoc
cd ~/antlr/sites/website-antlr4/api
git checkout gh-pages
git pull origin gh-pages
cd Java
jar xvf ~/.m2/repository/org/antlr/antlr4-runtime/4.5.1/antlr4-runtime-4.5.1-javadoc.jar
cd ../JavaTool
jar xvf ~/.m2/repository/org/antlr/antlr4/4.5.1/antlr4-4.5.1-javadoc.jar
git commit -a -m 'freshen api doc'
git push origin gh-pages
Maven Deploy
See Deploying ANTLR mvn artifacts.
Update doc
-
Update wiki target descriptions
-
Update Doc main page and the getting started page to use the latest version.
-
Add note about the prerelease to download.html if this is not a full release. Otherwise update the download page and the navigation bars to say 4.5 release with the date.