1
0
mirror of https://github.com/GeyserMC/GeyserOptionalPack.git synced 2025-12-19 14:59:14 +00:00

Jenkinsfile attempt 4

This commit is contained in:
Camotoy
2021-03-04 20:10:01 -05:00
parent 059b4ee5e5
commit 18792194f5
2 changed files with 11 additions and 6 deletions

8
Jenkinsfile vendored
View File

@@ -6,12 +6,8 @@ pipeline {
stages { stages {
stage ('Build') { stage ('Build') {
steps { steps {
sh 'wget https://launcher.mojang.com/v1/objects/37fd3c903861eeff3bc24b71eed48f828b5269c8/client.jar' sh './copy_java_files_to_pack.sh'
sh 'unzip client.jar -d extracted/' sh 'zip GeyserOptionalPack.zip -r . -x ".*" Jenkinsfile required_files.txt copy_java_files_to_pack.sh'
sh "while read p; do\nreadarray -d , -t filesToCopy<<< \"$p\"\nmkdir -p filesToCopy[1]\ncp filesToCopy[0] filesToCopy[1]\ndone <required_files.txt"
sh 'rm client.jar'
sh 'rm -r extracted'
sh 'zip GeyserOptionalPack.zip -r . -x ".*" Jenkinsfile'
} }
post { post {
success { success {

9
copy_java_files_to_pack.sh Executable file
View File

@@ -0,0 +1,9 @@
wget https://launcher.mojang.com/v1/objects/37fd3c903861eeff3bc24b71eed48f828b5269c8/client.jar
unzip client.jar -d extracted/
while read p; do
readarray -d , -t filesToCopy<<< "$p"
mkdir -p filesToCopy[1]
cp filesToCopy[0] filesToCopy[1]
done <required_files.txt
rm client.jar
rm -r extracted