Build script for release

This commit is contained in:
Daniel Mills 2020-07-27 20:49:20 -04:00
parent 77786af4d7
commit 1ae1cebab6
3 changed files with 34 additions and 26 deletions

8
.gitignore vendored
View File

@ -3,3 +3,11 @@
lib/ lib/
dependency-reduced-pom.xml dependency-reduced-pom.xml
release/
lint/in.jar
lint/out.jar
lint/mapping.txt

41
pom.xml
View File

@ -13,7 +13,7 @@
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<development.location.dan>${user.home}\Documents\development\server\plugins\${project.name}.jar</development.location.dan> <development.location.dan>${user.home}\Documents\development\server\plugins\${project.name}.jar</development.location.dan>
<development.location.brian>D:\Dan\MinecraftDevelopment\server\plugins\${project.name}.jar</development.location.brian> <lint.in>${project.basedir}\lint\in.jar</lint.in>
</properties> </properties>
<profiles> <profiles>
<profile> <profile>
@ -75,7 +75,7 @@
</build> </build>
</profile> </profile>
<profile> <profile>
<id>brian</id> <id>release</id>
<build> <build>
<resources> <resources>
<resource> <resource>
@ -102,7 +102,7 @@
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>
<configuration> <configuration>
<minimizeJar>true</minimizeJar> <minimizeJar>false</minimizeJar>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
@ -122,10 +122,11 @@
</executions> </executions>
<configuration> <configuration>
<skip>${skip.copy}</skip> <skip>${skip.copy}</skip>
<executable>${project.basedir}/scripts/copy.bat</executable> <executable>${project.basedir}/scripts/release.bat</executable>
<arguments> <arguments>
<argument>${project.basedir}\target\${project.name}-${project.version}.jar</argument> <argument>${project.basedir}\target\${project.name}-${project.version}.jar</argument>
<argument>${development.location.brian}</argument> <argument>${lint.in}</argument>
<argument>${project.version}</argument>
</arguments> </arguments>
</configuration> </configuration>
</plugin> </plugin>
@ -150,6 +151,12 @@
<version>1.16.1-R0.1-SNAPSHOT</version> <version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.10</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>javax.vecmath</groupId> <groupId>javax.vecmath</groupId>
<artifactId>vecmath</artifactId> <artifactId>vecmath</artifactId>
@ -161,27 +168,9 @@
<version>2.8.5</version> <version>2.8.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.zeroturnaround</groupId>
<artifactId>lombok</artifactId> <artifactId>zt-zip</artifactId>
<version>1.18.10</version> <version>1.14</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ninja.bytecode</groupId>
<artifactId>Shuriken</artifactId>
<version>1.1.24</version>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit.craftbukkit</groupId>
<artifactId>cb-1.16.1</artifactId>
<version>1.16.1</version>
<scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

11
scripts/release.bat Normal file
View File

@ -0,0 +1,11 @@
@Echo off
echo Apply Script: COPY
echo F|xcopy /y /s /f /q "%1" "%2"
cd lint
java -Xmx4g -Xms1m -jar proguard.jar @proguard.conf
cd ..
echo F|xcopy /y /s /f /q "lint/out.jar" "release/latest/Iris-%3.jar"
echo F|xcopy /y /s /f /q "lint/in.jar" "release/latest/Origin-%3.jar"
echo F|xcopy /y /s /f /q "lint/mapping.txt" "release/latest/mapping-%3.txt"
cd release
echo F|xcopy /y /s /f /q /E "latest" "%3/"