Skip to content

Commit

Permalink
chore(release): Add release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
christophd committed Sep 11, 2024
1 parent 1ec46ee commit 6436cfe
Show file tree
Hide file tree
Showing 10 changed files with 1,301 additions and 10 deletions.
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

VERSION := 4.4.0-SNAPSHOT
RELEASE_GIT_REMOTE := origin
GIT_COMMIT := $(shell git rev-list -1 HEAD)

default: help

help:
./scripts/citrus -h

release:
./scripts/citrus release --git-remote $(RELEASE_GIT_REMOTE) --release-version $(VERSION) --skip-tests

release-snapshot:
./scripts/citrus release --git-remote $(RELEASE_GIT_REMOTE) --snapshot-release --no-git-push

release-local:
./scripts/citrus release --git-remote $(RELEASE_GIT_REMOTE) --local-release --no-git-push --release-version $(VERSION)

release-major:
./scripts/citrus release --git-remote $(RELEASE_GIT_REMOTE) --major-release --release-version $(VERSION)

release-dry-run:
./scripts/citrus release --git-remote $(RELEASE_GIT_REMOTE) --release-version $(VERSION) --skip-tests --dry-run --no-git-push --keep-staging-repo
35 changes: 34 additions & 1 deletion citrus-remote-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

<!-- Project setup -->
<citrus.remote.report.directory>citrus-remote</citrus.remote.report.directory>
<citrus.remote.build.phase>package</citrus.remote.build.phase>
<citrus.remote.test.phase>none</citrus.remote.test.phase>
<citrus.remote.verify.phase>none</citrus.remote.verify.phase>

Expand All @@ -39,6 +40,22 @@

<build>
<plugins>
<!-- Do not deploy this module to Maven central -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<configuration>
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand All @@ -59,7 +76,7 @@
<goals>
<goal>test-jar</goal>
</goals>
<phase>package</phase>
<phase>${citrus.remote.build.phase}</phase>
<configuration>
<mainClass>org.citrusframework.remote.sample.entrypoint.CustomEntrypoint</mainClass>
</configuration>
Expand Down Expand Up @@ -313,9 +330,24 @@
</dependencies>

<profiles>
<profile>
<id>release-central</id>
<properties>
<citrus.remote.build.phase>none</citrus.remote.build.phase>
<citrus.remote.test.phase>none</citrus.remote.test.phase>
<citrus.remote.verify.phase>none</citrus.remote.verify.phase>
<docker.build.phase>none</docker.build.phase>
<docker.remove.phase>none</docker.remove.phase>
<docker.start.phase>none</docker.start.phase>
<docker.stop.phase>none</docker.stop.phase>
<download.wget.phase>none</download.wget.phase>
<failsafe.phase>none</failsafe.phase>
</properties>
</profile>
<profile>
<id>docker</id>
<properties>
<citrus.remote.build.phase>package</citrus.remote.build.phase>
<citrus.remote.test.phase>integration-test</citrus.remote.test.phase>
<citrus.remote.verify.phase>verify</citrus.remote.verify.phase>

Expand All @@ -332,6 +364,7 @@
<profile>
<id>skip-citrus-remote</id>
<properties>
<citrus.remote.build.phase>none</citrus.remote.build.phase>
<citrus.remote.test.phase>none</citrus.remote.test.phase>
<citrus.remote.verify.phase>none</citrus.remote.verify.phase>

Expand Down
84 changes: 75 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.docs.version>${project.version}</project.docs.version>
<java.version>17</java.version>

<maven.version>3.9.8</maven.version>
Expand Down Expand Up @@ -45,7 +46,6 @@
<maven.source.plugin.version>3.0.1</maven.source.plugin.version>
<maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
<maven.war.plugin.version>3.4.0</maven.war.plugin.version>
<maven.wagon.ssh.external.version>2.7</maven.wagon.ssh.external.version>
<apache.rat.plugin.version>0.15</apache.rat.plugin.version>

<citrus.version>4.3.2</citrus.version>
Expand All @@ -56,6 +56,7 @@
<log4j2.version>2.22.1</log4j2.version>
<slf4j.version>2.0.11</slf4j.version>
<vertx.version>4.5.9</vertx.version>
<xstream.version>1.4.20</xstream.version>

<!-- Documentation -->
<javadoc.options>-Xdoclint:none</javadoc.options>
Expand Down Expand Up @@ -100,6 +101,31 @@
</developer>
</developers>

<scm>
<connection>scm:git:[email protected]:citrusframework/citrus-remote.git</connection>
<developerConnection>scm:git:[email protected]/citrusframework/citrus-remote.git</developerConnection>
<url>http://github.com/citrusframework/citrus-remote.git</url>
</scm>

<organization>
<name>Citrus Framework Community</name>
<url>https://citrusframework.org</url>
</organization>

<mailingLists>
<mailingList>
<name>Project Announcements</name>
</mailingList>
<mailingList>
<name>Project Development List</name>
<post>[email protected]</post>
</mailingList>
<mailingList>
<name>Project User List</name>
<post>[email protected]</post>
</mailingList>
</mailingLists>

<modules>
<module>citrus-remote-server</module>
<module>citrus-remote-maven-plugin</module>
Expand Down Expand Up @@ -257,6 +283,16 @@
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${maven.nexus-staging.plugin.version}</version>
<dependencies>
<!--
TODO: Remove after OSSRH-66257, NEXUS-26993 are fixed,
-->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${xstream.version}</version>
</dependency>
</dependencies>
<configuration>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<serverId>sonatype-nexus-staging</serverId>
Expand Down Expand Up @@ -477,14 +513,44 @@
<artifactId>apache-rat-plugin</artifactId>
</plugin>
</plugins>

<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>${maven.wagon.ssh.external.version}</version>
</extension>
</extensions>
</build>

<profiles>
<!-- Distribution Management -->
<profile>
<id>release-central</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>

<!-- Deploy using the sonatype nexus staging maven plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading

0 comments on commit 6436cfe

Please sign in to comment.