diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2023-02-03 03:54:46 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2023-02-03 03:54:46 +0100 |
commit | 566dfe73ca11ed60e1a5b545872cefc4f0c8f976 (patch) | |
tree | 12473955f506b6d80a28d68e132a586aa1e98d5a /buildScripts | |
parent | dbb7ea00b803b619697d372435d38631c41c686e (diff) | |
download | lombok-566dfe73ca11ed60e1a5b545872cefc4f0c8f976.tar.gz lombok-566dfe73ca11ed60e1a5b545872cefc4f0c8f976.tar.bz2 lombok-566dfe73ca11ed60e1a5b545872cefc4f0c8f976.zip |
[build] final touches on updating deployment to new cloudflare host
Diffstat (limited to 'buildScripts')
-rw-r--r-- | buildScripts/compile.ant.xml | 2 | ||||
-rw-r--r-- | buildScripts/eclipse-p2.ant.xml | 2 | ||||
-rw-r--r-- | buildScripts/info.ant.xml | 21 | ||||
-rw-r--r-- | buildScripts/ivy.xml | 9 | ||||
-rw-r--r-- | buildScripts/maven.ant.xml | 4 | ||||
-rw-r--r-- | buildScripts/setup.ant.xml | 1 | ||||
-rw-r--r-- | buildScripts/supporters.ant.xml | 57 | ||||
-rw-r--r-- | buildScripts/website.ant.xml | 93 |
8 files changed, 62 insertions, 127 deletions
diff --git a/buildScripts/compile.ant.xml b/buildScripts/compile.ant.xml index 59715ee4..7fe76655 100644 --- a/buildScripts/compile.ant.xml +++ b/buildScripts/compile.ant.xml @@ -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 diff --git a/buildScripts/eclipse-p2.ant.xml b/buildScripts/eclipse-p2.ant.xml index d2375bb2..21ebf1d2 100644 --- a/buildScripts/eclipse-p2.ant.xml +++ b/buildScripts/eclipse-p2.ant.xml @@ -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 diff --git a/buildScripts/info.ant.xml b/buildScripts/info.ant.xml index fe6e0ee3..e975ce4d 100644 --- a/buildScripts/info.ant.xml +++ b/buildScripts/info.ant.xml @@ -250,13 +250,16 @@ Turns the changelog at doc/changelog.markdown into build/website/changelog.html. > ant website.build - > ant website.pack + > ant website.release-build > ant website.publish + > 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. > ant website.open @@ -269,14 +272,9 @@ Makes a changelog variant that lists only the newest changes; it is included in the distribution for convenience. > ant javadoc.build - > ant javadoc.pack - > 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. - > ant edge.pack > ant edge.publish '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, 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"> diff --git a/buildScripts/ivy.xml b/buildScripts/ivy.xml index f3816999..cb0065e7 100644 --- a/buildScripts/ivy.xml +++ b/buildScripts/ivy.xml @@ -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" /> @@ -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" /> diff --git a/buildScripts/maven.ant.xml b/buildScripts/maven.ant.xml index a09e09de..6003de74 100644 --- a/buildScripts/maven.ant.xml +++ b/buildScripts/maven.ant.xml @@ -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 @@ -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" /> diff --git a/buildScripts/setup.ant.xml b/buildScripts/setup.ant.xml index ec363cbf..4093feb1 100644 --- a/buildScripts/setup.ant.xml +++ b/buildScripts/setup.ant.xml @@ -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" /> diff --git a/buildScripts/supporters.ant.xml b/buildScripts/supporters.ant.xml deleted file mode 100644 index d1d3fedc..00000000 --- a/buildScripts/supporters.ant.xml +++ /dev/null @@ -1,57 +0,0 @@ -<!-- - Copyright (C) 2010-2017 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 - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. ---> -<project name="lombok-supporters" default="updateRepo" basedir=".." xmlns:ivy="antlib:com.zwitserloot.ivyplusplus" xmlns:git="antlib:com.rimerosolutions.ant.git"> - <description> -This buildfile is part of projectlombok.org. It is responsible for updating/maintaining the separate git repository -containing the status of lombok's supporters. - </description> - - <path id="supporters.path"> - <fileset dir="lib/supporters"> - <include name="*.jar" /> - </fileset> - </path> - - <taskdef uri="antlib:com.rimerosolutions.ant.git" resource="com/rimerosolutions/ant/git/jgit-ant-lib.xml" classpathref="supporters.path" /> - - <target name="checkIfRepoExists"> - <available file="website/lombokSupporters/.git/HEAD" property="supportersrepo.exists" /> - </target> - - <target name="initRepo" depends="checkIfRepoExists" unless="supportersrepo.exists"> - <git:git directory="website/lombokSupporters"> - <git:clone uri="escudo2:/data/git/lombokSupporters.git" /> - </git:git> - </target> - - <target name="updateRepo" depends="initRepo" unless="noUpdateRepo"> - <git:git directory="website/lombokSupporters"> - <git:pull /> - </git:git> - </target> - - <target name="deployToWebsiteBuild" depends="updateRepo"> - <copy todir="build/website/files" overwrite="true" failonerror="false" quiet="true"> - <fileset dir="website/lombokSupporters" /> - </copy> - </target> -</project> diff --git a/buildScripts/website.ant.xml b/buildScripts/website.ant.xml index aa0d150b..4877f20e 100644 --- a/buildScripts/website.ant.xml +++ b/buildScripts/website.ant.xml @@ -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 @@ -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> @@ -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"> @@ -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"> |