-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sonatype): Add Sonatype release (#21)
- Loading branch information
1 parent
0645ced
commit f5447d6
Showing
9 changed files
with
289 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,8 @@ node_modules | |
dist | ||
dist-test | ||
.stryker-tmp | ||
reports | ||
reports | ||
|
||
target/ | ||
pom.xml.versionsBackup | ||
packages/*/mvn/resources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Maven artifacts | ||
|
||
This is the base for the deployment of the packages to Sonatype, so they can be used in any Java/Scala/etc project. | ||
|
||
There are no classes or source files in the project. Instead, only the resources are included in the project. The used resources are the `dist/` folder for each project, with the packaged resources in `$project-name/` for the corresponding project. It should only be built after the npm project is built. | ||
|
||
There is no version defined in the project. Instead, the version is read in the `package.json` of the npm project, and set in the release script (`mvnPublish.sh`). | ||
|
||
The artifacts can be added as follows (replace `mutation-testing-elements` with `mutation-testing-report-schema` if you need the report): | ||
|
||
Maven: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>io.stryker-mutator</groupId> | ||
<artifactId>mutation-testing-elements</artifactId> | ||
<version>${mutation-testing-elements.version}</version> <!-- Version defined elsewhere --> | ||
</dependency> | ||
``` | ||
|
||
Sbt: | ||
|
||
```scala | ||
libraryDependencies += "io.stryker-mutator" % "mutation-testing-elements" % elementsVersion // Version defined elsewhere | ||
``` | ||
|
||
Replace `mutation-testing-elements` with `mutation-testing-report-schema` if you need the report. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# Called from packages/$project by npm postpublish, so the pwd is already the project folder | ||
|
||
PROJ_BASE=$(basename `pwd`) | ||
PACKAGE_VERSION=$(cat package.json \ | ||
| grep version \ | ||
| head -1 \ | ||
| awk -F: '{ print $2 }' \ | ||
| sed 's/[", ]//g') | ||
|
||
echo "Deploying $PROJ_BASE $PACKAGE_VERSION..." | ||
|
||
echo "Copying dist files to resources" | ||
mkdir -p mvn/resources | ||
cp -r dist mvn/resources/$PROJ_BASE | ||
|
||
echo "Starting deploy process" | ||
cd mvn | ||
mvn -P release versions:set "-DnewVersion=$PACKAGE_VERSION" | ||
mvn -P release deploy --settings ../../../mvn/settings.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<servers> | ||
<server> | ||
<id>ossrh</id> | ||
<username>${env.SONATYPE_USERNAME}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
</settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>io.stryker-mutator</groupId> | ||
<artifactId>mutation-testing-elements</artifactId> | ||
<version>SET-BY-SCRIPT-SNAPSHOT</version> | ||
<name>${project.artifactId}</name> | ||
<description>A suite of web components for a mutation testing report.</description> | ||
<url>https://stryker-mutator.io/</url> | ||
<inceptionYear>2019</inceptionYear> | ||
|
||
<licenses> | ||
<license> | ||
<name>Apache License 2.0</name> | ||
<url>https://github.com/stryker-mutator/mutation-testing-elements/blob/master/LICENSE</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<developers> | ||
<!-- TODO --> | ||
</developers> | ||
<issueManagement> | ||
<system>GitHub</system> | ||
<url>https://github.com/stryker-mutator/mutation-testing-elements/issues</url> | ||
</issueManagement> | ||
<scm> | ||
<connection>scm:git:https://github.com/stryker-mutator/mutation-testing-elements.git</connection> | ||
<developerConnection>scm:git:https://github.com/stryker-mutator/mutation-testing-elements.git</developerConnection> | ||
<url>https://github.com/stryker-mutator/mutation-testing-elements</url> | ||
<tag>HEAD</tag> | ||
</scm> | ||
<distributionManagement> | ||
<snapshotRepository> | ||
<id>ossrh</id> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
</snapshotRepository> | ||
<repository> | ||
<id>ossrh</id> | ||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository> | ||
</distributionManagement> | ||
<properties> | ||
<encoding>UTF-8</encoding> | ||
<!-- Release versions--> | ||
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version> | ||
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version> | ||
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version> | ||
</properties> | ||
<dependencies></dependencies> | ||
<build> | ||
<resources> | ||
<resource> | ||
<directory>resources/</directory> | ||
</resource> | ||
</resources> | ||
<plugins></plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>${maven-gpg-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
<configuration> | ||
<keyname>strykermutator</keyname> | ||
<passphrase>${env.PGP_PASSPHRASE}</passphrase> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.sonatype.plugins</groupId> | ||
<artifactId>nexus-staging-maven-plugin</artifactId> | ||
<version>${nexus-staging-maven-plugin.version}</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<serverId>ossrh</serverId> | ||
<nexusUrl>https://oss.sonatype.org/</nexusUrl> | ||
<autoReleaseAfterClose>true</autoReleaseAfterClose> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>${maven-deploy-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>default-deploy</id> | ||
<phase>deploy</phase> | ||
<goals> | ||
<goal>deploy</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>io.stryker-mutator</groupId> | ||
<artifactId>mutation-testing-report-schema</artifactId> | ||
<version>SET-BY-SCRIPT-SNAPSHOT</version> | ||
<name>${project.artifactId}</name> | ||
<description>The json schema for a mutation testing report.</description> | ||
<url>https://stryker-mutator.io/</url> | ||
<inceptionYear>2019</inceptionYear> | ||
|
||
<licenses> | ||
<license> | ||
<name>Apache License 2.0</name> | ||
<url>https://github.com/stryker-mutator/mutation-testing-elements/blob/master/LICENSE</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<developers> | ||
<!-- TODO --> | ||
</developers> | ||
<issueManagement> | ||
<system>GitHub</system> | ||
<url>https://github.com/stryker-mutator/mutation-testing-elements/issues</url> | ||
</issueManagement> | ||
<scm> | ||
<connection>scm:git:https://github.com/stryker-mutator/mutation-testing-elements.git</connection> | ||
<developerConnection>scm:git:https://github.com/stryker-mutator/mutation-testing-elements.git</developerConnection> | ||
<url>https://github.com/stryker-mutator/mutation-testing-elements</url> | ||
<tag>HEAD</tag> | ||
</scm> | ||
<distributionManagement> | ||
<snapshotRepository> | ||
<id>ossrh</id> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
</snapshotRepository> | ||
<repository> | ||
<id>ossrh</id> | ||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository> | ||
</distributionManagement> | ||
<properties> | ||
<encoding>UTF-8</encoding> | ||
<!-- Release versions--> | ||
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version> | ||
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version> | ||
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version> | ||
</properties> | ||
<dependencies></dependencies> | ||
<build> | ||
<resources> | ||
<resource> | ||
<directory>resources/</directory> | ||
</resource> | ||
</resources> | ||
<plugins></plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>${maven-gpg-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
<configuration> | ||
<keyname>strykermutator</keyname> | ||
<passphrase>${env.PGP_PASSPHRASE}</passphrase> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.sonatype.plugins</groupId> | ||
<artifactId>nexus-staging-maven-plugin</artifactId> | ||
<version>${nexus-staging-maven-plugin.version}</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<serverId>ossrh</serverId> | ||
<nexusUrl>https://oss.sonatype.org/</nexusUrl> | ||
<autoReleaseAfterClose>true</autoReleaseAfterClose> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>${maven-deploy-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>default-deploy</id> | ||
<phase>deploy</phase> | ||
<goals> | ||
<goal>deploy</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters