Skip to content

Commit 375891f

Browse files
committed
[build] Check version before allowing release
1 parent 250bc06 commit 375891f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

buildScripts/setup.ant.xml

+10
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,16 @@ This buildfile is part of projectlombok.org. It sets up the build itself.
336336
<property name="ossrh.username" value="rzwitserloot" />
337337
</target>
338338

339+
<target name="test.release.version" depends="-test.release.version" />
340+
<target name="-test.release.version" depends="version" unless="skip.test.version">
341+
<fail>
342+
<condition>
343+
<not><matches pattern="^.*[02468]$" string="${lombok.version}"/></not>
344+
</condition>
345+
You need to manually sort out the changelog, and set Version.java so that the release version is an even number (and the name isn't Edgy Guinea Pig). Use -Dskip.test.version= to override.
346+
</fail>
347+
</target>
348+
339349
<fail>ant needs to be at least v1.10.0 or higher to build lombok. Your version is: ${ant.version}
340350
<condition>
341351
<not><antversion atleast="1.10.0" /></not>

buildScripts/website.ant.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ such as applying the templates to produce the website, converting the changelog
263263
<fail />
264264
</target>
265265

266-
<target name="release.publish" depends="maven, -release.publish.site, website.publish, eclipsep2.publish, maven.publish" description="Deploys a new official lombok release everywhere: maven, website, p2 site" />
266+
<target name="release.publish" depends="-test.release.version, maven, -release.publish.site, website.publish, eclipsep2.publish, maven.publish, -edge.publish" description="Deploys a new official lombok release everywhere: maven, website, p2 site" />
267267

268268
<target name="edge.website" depends="compile.support, version, dist">
269269
<delete quiet="true" file="build/website/download-edge.html" />
@@ -288,7 +288,9 @@ such as applying the templates to produce the website, converting the changelog
288288

289289
<target name="-edge.website.publish" depends="-edge.website.tohost, -website.commit-and-push-hostgit" />
290290

291-
<target name="edge.publish" depends="dist, -edge.website.publish, maven.edge" description="Builds an edge release, sends it to the projectlombok.org server and deploys it by updating the download-edge link">
291+
<target name="edge.publish" depends="-edge.website.publish, -edge.publish" description="Builds an edge release, sends it to the projectlombok.org server and deploys it by updating the download-edge link" />
292+
293+
<target name="-edge.publish" depends="dist, maven.edge">
292294
<copy file="dist/lombok-${lombok.version}.jar" tofile="build/edge-releases/lombok-edge.jar" />
293295
<java classname="lombok.publish.PublishToBucket" failonerror="true">
294296
<classpath>

0 commit comments

Comments
 (0)