Skip to content

Commit 566dfe7

Browse files
committed
[build] final touches on updating deployment to new cloudflare host
1 parent dbb7ea0 commit 566dfe7

10 files changed

+65
-129
lines changed

buildScripts/compile.ant.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (C) 2020-2022 The Project Lombok Authors.
2+
Copyright (C) 2020-2023 The Project Lombok Authors.
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal

buildScripts/eclipse-p2.ant.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (C) 2020 The Project Lombok Authors.
2+
Copyright (C) 2020-2023 The Project Lombok Authors.
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal

buildScripts/info.ant.xml

+9-12
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,16 @@ Turns the changelog at doc/changelog.markdown into
250250
build/website/changelog.html.
251251

252252
&gt; ant website.build
253-
&gt; ant website.pack
253+
&gt; ant website.release-build
254254
&gt; ant website.publish
255+
&gt; ant website.release-publish
255256

256-
'build' Builds the website (by for example applying freemarker templates) into
257-
build/website.
258-
'pack' bzips this up, ready to ship to the server.
259-
'publish' sends this to the server and runs a script to deploy.
257+
'build' Builds the website into build/website, _without_ reflecting a new release; this is
258+
just in case you e.g. edited some documentation.
259+
'publish' deploys this to the server.
260+
'release-build' builds the website _with_ reflecting a new release, updating all-versions,
261+
the download page, updating the javadoc, etc.
262+
'release-ppublic' deploys this to the server.
260263

261264
&gt; ant website.open
262265

@@ -269,14 +272,9 @@ Makes a changelog variant that lists only the newest changes; it is included
269272
in the distribution for convenience.
270273

271274
&gt; ant javadoc.build
272-
&gt; ant javadoc.pack
273-
&gt; ant javadoc.publish
274275

275276
'build' Builds the javadoc into build/api.
276-
'pack' bzips this up, ready to ship to the server.
277-
'publish' sends this to the server and runs a script to deploy.
278277

279-
&gt; ant edge.pack
280278
&gt; ant edge.publish
281279

282280
'pack' creates a bzip with all relevant files needed to deploy a new edge
@@ -285,8 +283,7 @@ maven repo update so that the edge release can be fetched as a maven dep,
285283
and an update to the download-edge page listing the latest changes included
286284
in the edge release.
287285

288-
'publish' sends this to the server, runs a script server-side to deploy the
289-
content, and updates a git tag on success.</echo>
286+
'publish' sends the edge release to projectlombok.org directly.</echo>
290287
</target>
291288

292289
<target name="help.p2">

buildScripts/ivy.xml

-9
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
<!-- dependencies for the build itself, such as tools to create the website or deploy to servers. -->
55
<conf name="buildtools" />
66

7-
<!-- dependencies needed only for the 'manage lombok supporters' part of the build -->
8-
<conf name="supporters" />
9-
107
<!-- test: base dependencies required to run the tests. Does not include javac or ecj. -->
118
<conf name="test" />
129

@@ -67,12 +64,6 @@
6764
<dependency org="com.sparkjava" name="spark-core" rev="2.9.2" conf="buildtools->default" />
6865
<dependency org="software.amazon.awssdk" name="s3" rev="2.19.29" conf="buildtools->default" />
6966

70-
<dependency org="org.eclipse.jgit" name="org.eclipse.jgit.ant" rev="5.2.0.201812061821-r" conf="supporters->default" />
71-
<dependency org="org.eclipse.jgit" name="org.eclipse.jgit" rev="5.2.0.201812061821-r" conf="supporters->default" />
72-
<dependency org="com.jcraft" name="jsch" rev="0.1.54" conf="supporters->default" />
73-
<dependency org="com.rimerosolutions.ant" name="ant-git-tasks" rev="1.3.2" conf="supporters->default" />
74-
<dependency org="org.slf4j" name="slf4j-simple" rev="1.8.0-beta2" conf="supporters->default" />
75-
7667
<!-- javacs -->
7768
<dependency org="net.java.openjdk.custom" name="javac6" rev="1.6.0.18" conf="javac6->runtime" />
7869
<dependency org="net.java.openjdk.custom" name="javac7" rev="1.7.0" conf="javac7->runtime" />

buildScripts/maven.ant.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (C) 2020-2022 The Project Lombok Authors.
2+
Copyright (C) 2020-2023 The Project Lombok Authors.
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal
@@ -149,7 +149,7 @@ This buildfile is part of projectlombok.org. It makes maven-compatible repositor
149149
<copy file="dist/lombok-${lombok.version}.jar" tofile="build/edge-releases/lombok-edge.jar" />
150150
</target>
151151

152-
<target name="maven.edge.publish" depends="maven.edge, compile.support" description="Creates the maven repo for the snapshot build and publishes it to projectlombok.org">
152+
<target name="maven.edge-publish" depends="maven.edge, compile.support" description="Creates the maven repo for the snapshot build and publishes it to projectlombok.org">
153153
<java classname="lombok.publish.PublishToBucket" failonerror="true">
154154
<classpath>
155155
<path refid="cp.buildtools" />

buildScripts/setup.ant.xml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ This buildfile is part of projectlombok.org. It sets up the build itself.
4343
<property name="gpg.keyrings" location="gpg.keyring" />
4444
<property name="exe.gpg" value="gpg" />
4545
<property name="exe.curl" value="curl" />
46+
<property name="exe.git" value="git" />
4647

4748
<condition property="os.specific.native-swt-lib" value="org.eclipse.swt.gtk.linux.aarch64">
4849
<os name="Linux" arch="aarch64" />

buildScripts/supporters.ant.xml

-57
This file was deleted.

buildScripts/website.ant.xml

+48-45
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (C) 2020 The Project Lombok Authors.
2+
Copyright (C) 2020-2023 The Project Lombok Authors.
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal
@@ -95,7 +95,7 @@ such as applying the templates to produce the website, converting the changelog
9595
</sequential>
9696
</macrodef>
9797

98-
<target name="website.release-build" depends="version, -website.clean, compile.support">
98+
<target name="website.release-build" depends="version, -website.clean, javadoc.build, compile.support">
9999
<website.make version="${lombok.version}" fullversion="${lombok.fullversion}" cmd="all-newrelease" />
100100
</target>
101101

@@ -129,27 +129,54 @@ such as applying the templates to produce the website, converting the changelog
129129
</java>
130130
</target>
131131

132-
<target name="website.pack" depends="website.build">
133-
<mkdir dir="dist" />
134-
<tar destfile="dist/website.tar.bz2" compression="bzip2">
135-
<tarfileset dir="build/website" excludes="download-edge.html" />
136-
</tar>
132+
<target name="-website.init-hostgit">
133+
<property name="loc.hostingGit" location="../website-cloudflare" />
134+
<fail>
135+
You need the website-cloudflare repo as a sibling to your lombok repo to publish the website.
136+
<condition>
137+
<not><available file="${loc.hostingGit}/.git" /></not>
138+
</condition>
139+
</fail>
137140
</target>
138141

139-
<target name="website.publish" depends="website.pack" description="Builds the website, compresses it, sends it to the projectlombok.org server and deploys it">
140-
<ivy:scpUpload
141-
from="dist/website.tar.bz2"
142-
to="/data/lombok/staging"
143-
server="projectlombok.org"
144-
username="${ssh.username}"
145-
keyfile="${ssh.keyfile}"
146-
knownHosts="ssh.knownHosts" />
147-
<ivy:sshExec
148-
cmd="/data/lombok/stagingCmd/deployWebsite"
149-
server="projectlombok.org"
150-
username="${ssh.username}"
151-
keyfile="${ssh.keyfile}"
152-
knownHosts="ssh.knownHosts" />
142+
<target name="-website.copyto-hostgit">
143+
<sync todir="${loc.hostingGit}/website">
144+
<fileset dir="build/website" />
145+
</sync>
146+
</target>
147+
148+
<target name="-website.pull-hostgit" depends="deps, -website.init-hostgit">
149+
<exec executable="${exe.git}" failonerror="true" dir="${loc.hostingGit}">
150+
<arg value="pull" />
151+
</exec>
152+
</target>
153+
154+
<target name="-website.commit-and-push-hostgit">
155+
<exec executable="${exe.git}" failonerror="true" dir="${loc.hostingGit}">
156+
<arg value="add" />
157+
<arg value="-A" />
158+
</exec>
159+
<exec executable="${exe.git}" failonerror="true" dir="${loc.hostingGit}">
160+
<arg value="commit" />
161+
<arg value="-m" />
162+
<arg value="website update" />
163+
</exec>
164+
<exec executable="${exe.git}" failonerror="true" dir="${loc.hostingGit}">
165+
<arg value="push" />
166+
</exec>
167+
</target>
168+
169+
<target name="website.publish" depends="-website.pull-hostgit, website.build, -website.copyto-hostgit" description="Builds the website and copies it to the git repo serving as source for the cloudflare-hosted projectlombok.org site">
170+
<antcall target="-website.commit-and-push-hostgit" />
171+
</target>
172+
173+
<target name="website.release-publish" depends="dist, -website.pull-hostgit, website.release-build, -website.copyto-hostgit" description="Builds the website and copies it to the git repo serving as source for the cloudflare-hosted projectlombok.org site">
174+
<sync todir="${loc.hostingGit}/api">
175+
<fileset dir="doc/api" />
176+
</sync>
177+
<echo file="${loc.hostingGit}/CURRENT_VERSION">${lombok.version}</echo>
178+
<copy file="dist/lombok-${lombok.version}.jar" todir="${loc.hostingGit}/releases" />
179+
<antcall target="-website.commit-and-push-hostgit" />
153180
</target>
154181

155182
<target name="javadoc.build" description="Generates the javadoc" depends="version, compile" unless="skip.javadoc">
@@ -207,30 +234,6 @@ such as applying the templates to produce the website, converting the changelog
207234
<echo append="true" file="doc/api/tag-search-index.js"></echo>
208235
</target>
209236

210-
<target name="javadoc.pack" depends="javadoc.build">
211-
<mkdir dir="dist" />
212-
<tar destfile="dist/javadoc.tar.bz2" compression="bzip2">
213-
<tarfileset dir="build/api" />
214-
</tar>
215-
<echo>File dist/javadoc.tar.bz2 is available</echo>
216-
</target>
217-
218-
<target name="javadoc.publish" depends="javadoc.pack">
219-
<ivy:scpUpload
220-
from="dist/javadoc.tar.bz2"
221-
to="/data/lombok/staging"
222-
server="projectlombok.org"
223-
username="${ssh.username}"
224-
keyfile="${ssh.keyfile}"
225-
knownHosts="ssh.knownHosts" />
226-
<ivy:sshExec
227-
cmd="/data/lombok/stagingCmd/deployJavadoc"
228-
server="projectlombok.org"
229-
username="${ssh.username}"
230-
keyfile="${ssh.keyfile}"
231-
knownHosts="ssh.knownHosts" />
232-
</target>
233-
234237
<target name="latest-changes.build" depends="compile.support, version" description="Creates the latest changes HTML file from the markdown in doc/changelog">
235238
<mkdir dir="build/website" />
236239
<java classname="lombok.website.WebsiteMaker" failonerror="true">

doc/changelog.markdown

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Lombok Changelog
22
----------------
33

4-
### v1.18.25 "Edgy Guinea Pig"
4+
### v1.18.26 (Feb 3rd, 2023)
5+
56
* PLATFORM: JDK19 support added. [Issue #3264](https://github.com/projectlombok/lombok/issues/3264).
67
* BUGFIX: Using the refactor script: "Rename field" in a `@(Super)Builder`-marked file in eclipse or VSCode would cause issues. [Issue #3181] (https://github.com/projectlombok/lombok/issues/3181).
78
* BUGFIX: Using `val` together with any call to a method that explicitly resolves to a default impl in an interface didn't work in javac. [Issue #3242](https://github.com/projectlombok/lombok/issues/3242).

src/support/lombok/website/WebsiteMaker.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ private Map<String, Object> createExtendedDataModel(Domain domain, boolean newRe
388388
}
389389

390390
private static List<List<String>> readAllVersions(Domain domain) throws IOException {
391-
InputStream in = domain.url("all-versions.html").openStream();
391+
InputStream in = domain.url("all-versions").openStream();
392392
ArrayList<List<String>> links = new ArrayList<List<String>>();
393393
try {
394394
BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));

0 commit comments

Comments
 (0)