0
This commit is contained in:
TheE
2017-07-31 16:21:48 +02:00
6 changed files with 71 additions and 58 deletions

View File

@@ -31,7 +31,7 @@ If you wish to use [SLF4J](http://slf4j.org) in your Bukkit plugin, or if your p
<dependency> <dependency>
<groupId>info.ronjenkins</groupId> <groupId>info.ronjenkins</groupId>
<artifactId>slf4bukkit</artifactId> <artifactId>slf4bukkit</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
``` ```

24
circle.yml Normal file
View File

@@ -0,0 +1,24 @@
machine:
java:
version: oraclejdk8
dependencies:
pre:
- wget -nv https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
- sudo tar -zxf apache-maven-3.3.9-bin.tar.gz -C /usr/local/
- rm apache-maven-3.3.9-bin.tar.gz
- sudo ln -sfn /usr/local/apache-maven-3.3.9 /usr/local/apache-maven
override:
- mvn -V -DskipTests clean install dependency:resolve-plugins dependency:go-offline
post:
- bash ./env.sh
test:
override:
- exit # We don't have any tests right now.
deployment:
master:
branch: master
commands:
- bash ./deploy.sh

20
deploy.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -e
mvn clean
source .env
sed -i -e "s/GMSP_OAUTHTOKEN/${GMSP_OAUTHTOKEN}/" settings.xml
mvn -s ./settings.xml -Drtr.release=true -P release
git config --global user.email "me@ronjenkins.info"
git config --global user.name "Ronald Jack Jenkins Jr."
POM_VERSION=$(cat .version | xargs)
git add pom.xml README.md
git commit -m "Committing release $POM_VERSION"
git tag "$POM_VERSION"
git push origin "$POM_VERSION"

2
env.sh Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
env | grep GMSP_OAUTHTOKEN >> .env

69
pom.xml
View File

@@ -6,12 +6,12 @@
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses />. along with this program. If not, see <http://www.gnu.org/licenses />.
--> -->
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>info.ronjenkins</groupId> <groupId>info.ronjenkins</groupId>
<artifactId>slf4bukkit</artifactId> <artifactId>slf4bukkit</artifactId>
<version>0.1.5-SNAPSHOT</version> <version>0.1.6-SNAPSHOT</version>
<name>SLF4Bukkit</name> <name>SLF4Bukkit</name>
<description>${project.name} is an SLF4J binding that uses Bukkit's plugin logging system.</description> <description>${project.name} is an SLF4J binding that uses Bukkit's plugin logging system.</description>
<url>http://rjenkinsjr.github.io/slf4bukkit</url> <url>http://rjenkinsjr.github.io/slf4bukkit</url>
@@ -29,7 +29,6 @@
<maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.7</maven.compiler.target>
<maven.javadoc.version>2.10.3</maven.javadoc.version> <maven.javadoc.version>2.10.3</maven.javadoc.version>
<sonar.java.source>${maven.compiler.source}</sonar.java.source>
<rtr.allowExternalSnapshots>true</rtr.allowExternalSnapshots> <rtr.allowExternalSnapshots>true</rtr.allowExternalSnapshots>
<site.src>${project.basedir}/src/site</site.src> <site.src>${project.basedir}/src/site</site.src>
<site.dest>${project.basedir}/target/site-src</site.dest> <site.dest>${project.basedir}/target/site-src</site.dest>
@@ -51,6 +50,12 @@
</license> </license>
</licenses> </licenses>
<!-- Dependencies --> <!-- Dependencies -->
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
@@ -143,26 +148,6 @@
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
<!-- Plugins used by profiles. -->
<pluginManagement>
<plugins>
<!-- SonarQube analysis. -->
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sonarqube-analysis</id>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build> </build>
<!-- Manages site/report configuration. --> <!-- Manages site/report configuration. -->
<reporting> <reporting>
@@ -254,32 +239,9 @@
</plugins> </plugins>
</reporting> </reporting>
<profiles> <profiles>
<!-- SonarQube analysis profile. -->
<profile>
<id>sonarqube</id>
<activation>
<property>
<name>sonar.host.url</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<!-- Things to do only for releases. --> <!-- Things to do only for releases. -->
<profile> <profile>
<id>release</id> <id>release</id>
<activation>
<property>
<name>rtr.release</name>
<value>true</value>
</property>
</activation>
<!-- TODO: uncomment once we reach 1.0.0 --> <!-- TODO: uncomment once we reach 1.0.0 -->
<!--properties> <!--properties>
<site.profile>production</site.profile> <site.profile>production</site.profile>
@@ -300,9 +262,7 @@
</goals> </goals>
<configuration> <configuration>
<target> <target>
<propertyfile file="${project.basedir}/version.properties"> <echo message="${project.version}" file="${project.basedir}/.version" />
<entry key="RELEASE_POM_VERSION" value="${project.version}" />
</propertyfile>
</target> </target>
</configuration> </configuration>
</execution> </execution>
@@ -336,18 +296,13 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- SonarQube analysis. -->
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
</plugin>
<!-- Deploy the Maven artifacts to a local directory for publishing to GitHub. --> <!-- Deploy the Maven artifacts to a local directory for publishing to GitHub. -->
<plugin> <plugin>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version> <version>2.8.2</version>
<configuration> <configuration>
<altDeploymentRepository> <altDeploymentRepository>
internal.repo::default::file://${maven2.repo.dir} internal.repo::default::file://${maven2.repo.dir}
</altDeploymentRepository> </altDeploymentRepository>
</configuration> </configuration>
</plugin> </plugin>
@@ -425,4 +380,4 @@
</build> </build>
</profile> </profile>
</profiles> </profiles>
</project> </project>

12
settings.xml Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<!-- GitHub site deployment. -->
<server>
<id>github</id>
<password>GMSP_OAUTHTOKEN</password>
</server>
</servers>
</settings>