Skip to content

Commit

Permalink
[build] final touches on updating deployment to new cloudflare host
Browse files Browse the repository at this point in the history
  • Loading branch information
rzwitserloot committed Feb 3, 2023
1 parent dbb7ea0 commit 566dfe7
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 129 deletions.
2 changes: 1 addition & 1 deletion buildScripts/compile.ant.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (C) 2020-2022 The Project Lombok Authors.
Copyright (C) 2020-2023 The Project Lombok Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion buildScripts/eclipse-p2.ant.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (C) 2020 The Project Lombok Authors.
Copyright (C) 2020-2023 The Project Lombok Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
21 changes: 9 additions & 12 deletions buildScripts/info.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,16 @@ Turns the changelog at doc/changelog.markdown into
build/website/changelog.html.

&gt; ant website.build
&gt; ant website.pack
&gt; ant website.release-build
&gt; ant website.publish
&gt; ant website.release-publish

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

&gt; ant website.open

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

&gt; ant javadoc.build
&gt; ant javadoc.pack
&gt; ant javadoc.publish

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

&gt; ant edge.pack
&gt; ant edge.publish

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

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

<target name="help.p2">
Expand Down
9 changes: 0 additions & 9 deletions buildScripts/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<!-- dependencies for the build itself, such as tools to create the website or deploy to servers. -->
<conf name="buildtools" />

<!-- dependencies needed only for the 'manage lombok supporters' part of the build -->
<conf name="supporters" />

<!-- test: base dependencies required to run the tests. Does not include javac or ecj. -->
<conf name="test" />

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

<dependency org="org.eclipse.jgit" name="org.eclipse.jgit.ant" rev="5.2.0.201812061821-r" conf="supporters->default" />
<dependency org="org.eclipse.jgit" name="org.eclipse.jgit" rev="5.2.0.201812061821-r" conf="supporters->default" />
<dependency org="com.jcraft" name="jsch" rev="0.1.54" conf="supporters->default" />
<dependency org="com.rimerosolutions.ant" name="ant-git-tasks" rev="1.3.2" conf="supporters->default" />
<dependency org="org.slf4j" name="slf4j-simple" rev="1.8.0-beta2" conf="supporters->default" />

<!-- javacs -->
<dependency org="net.java.openjdk.custom" name="javac6" rev="1.6.0.18" conf="javac6->runtime" />
<dependency org="net.java.openjdk.custom" name="javac7" rev="1.7.0" conf="javac7->runtime" />
Expand Down
4 changes: 2 additions & 2 deletions buildScripts/maven.ant.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (C) 2020-2022 The Project Lombok Authors.
Copyright (C) 2020-2023 The Project Lombok Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -149,7 +149,7 @@ This buildfile is part of projectlombok.org. It makes maven-compatible repositor
<copy file="dist/lombok-${lombok.version}.jar" tofile="build/edge-releases/lombok-edge.jar" />
</target>

<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">
<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">
<java classname="lombok.publish.PublishToBucket" failonerror="true">
<classpath>
<path refid="cp.buildtools" />
Expand Down
1 change: 1 addition & 0 deletions buildScripts/setup.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ This buildfile is part of projectlombok.org. It sets up the build itself.
<property name="gpg.keyrings" location="gpg.keyring" />
<property name="exe.gpg" value="gpg" />
<property name="exe.curl" value="curl" />
<property name="exe.git" value="git" />

<condition property="os.specific.native-swt-lib" value="org.eclipse.swt.gtk.linux.aarch64">
<os name="Linux" arch="aarch64" />
Expand Down
57 changes: 0 additions & 57 deletions buildScripts/supporters.ant.xml

This file was deleted.

93 changes: 48 additions & 45 deletions buildScripts/website.ant.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (C) 2020 The Project Lombok Authors.
Copyright (C) 2020-2023 The Project Lombok Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -95,7 +95,7 @@ such as applying the templates to produce the website, converting the changelog
</sequential>
</macrodef>

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

Expand Down Expand Up @@ -129,27 +129,54 @@ such as applying the templates to produce the website, converting the changelog
</java>
</target>

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

<target name="website.publish" depends="website.pack" description="Builds the website, compresses it, sends it to the projectlombok.org server and deploys it">
<ivy:scpUpload
from="dist/website.tar.bz2"
to="/data/lombok/staging"
server="projectlombok.org"
username="${ssh.username}"
keyfile="${ssh.keyfile}"
knownHosts="ssh.knownHosts" />
<ivy:sshExec
cmd="/data/lombok/stagingCmd/deployWebsite"
server="projectlombok.org"
username="${ssh.username}"
keyfile="${ssh.keyfile}"
knownHosts="ssh.knownHosts" />
<target name="-website.copyto-hostgit">
<sync todir="${loc.hostingGit}/website">
<fileset dir="build/website" />
</sync>
</target>

<target name="-website.pull-hostgit" depends="deps, -website.init-hostgit">
<exec executable="${exe.git}" failonerror="true" dir="${loc.hostingGit}">
<arg value="pull" />
</exec>
</target>

<target name="-website.commit-and-push-hostgit">
<exec executable="${exe.git}" failonerror="true" dir="${loc.hostingGit}">
<arg value="add" />
<arg value="-A" />
</exec>
<exec executable="${exe.git}" failonerror="true" dir="${loc.hostingGit}">
<arg value="commit" />
<arg value="-m" />
<arg value="website update" />
</exec>
<exec executable="${exe.git}" failonerror="true" dir="${loc.hostingGit}">
<arg value="push" />
</exec>
</target>

<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">
<antcall target="-website.commit-and-push-hostgit" />
</target>

<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">
<sync todir="${loc.hostingGit}/api">
<fileset dir="doc/api" />
</sync>
<echo file="${loc.hostingGit}/CURRENT_VERSION">${lombok.version}</echo>
<copy file="dist/lombok-${lombok.version}.jar" todir="${loc.hostingGit}/releases" />
<antcall target="-website.commit-and-push-hostgit" />
</target>

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

<target name="javadoc.pack" depends="javadoc.build">
<mkdir dir="dist" />
<tar destfile="dist/javadoc.tar.bz2" compression="bzip2">
<tarfileset dir="build/api" />
</tar>
<echo>File dist/javadoc.tar.bz2 is available</echo>
</target>

<target name="javadoc.publish" depends="javadoc.pack">
<ivy:scpUpload
from="dist/javadoc.tar.bz2"
to="/data/lombok/staging"
server="projectlombok.org"
username="${ssh.username}"
keyfile="${ssh.keyfile}"
knownHosts="ssh.knownHosts" />
<ivy:sshExec
cmd="/data/lombok/stagingCmd/deployJavadoc"
server="projectlombok.org"
username="${ssh.username}"
keyfile="${ssh.keyfile}"
knownHosts="ssh.knownHosts" />
</target>

<target name="latest-changes.build" depends="compile.support, version" description="Creates the latest changes HTML file from the markdown in doc/changelog">
<mkdir dir="build/website" />
<java classname="lombok.website.WebsiteMaker" failonerror="true">
Expand Down
3 changes: 2 additions & 1 deletion doc/changelog.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Lombok Changelog
----------------

### v1.18.25 "Edgy Guinea Pig"
### v1.18.26 (Feb 3rd, 2023)

* PLATFORM: JDK19 support added. [Issue #3264](https://github.com/projectlombok/lombok/issues/3264).
* 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).
* 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).
Expand Down
2 changes: 1 addition & 1 deletion src/support/lombok/website/WebsiteMaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ private Map<String, Object> createExtendedDataModel(Domain domain, boolean newRe
}

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

0 comments on commit 566dfe7

Please sign in to comment.