Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
- #21
- #20: aarch64 and armhf are now compiled with ubuntu xenial rather than ubuntu focal
- An issue mentioned in Discord. x86_64 is now compiled with centos 7 rather than ubuntu xenial
  • Loading branch information
TobiasDeBruijn committed Dec 4, 2021
1 parent e132f10 commit bfc3512
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
21 changes: 12 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ RUST_SOURCE_FILES := $(shell find lib/src -type f)
# Release - Linux x86_64 Xenial
lib/target/x86_64-unknown-linux-gnu/release/libskinfixer.so: ${RUST_SOURCE_FILES}
mkdir -p lib/target/x86_64-unknown-linux-gnu/release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-xenial-builder release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-centos7 release

# Release - Linux aarch64
lib/target/aarch64-unknown-linux-gnu/release/libskinfixer.so: ${RUST_SOURCE_FILES}
mkdir -p lib/target/aarch64-unknown-linux-gnu/release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-aarch64-focal-builder release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-aarch64-xenial release

# Release - Linux armhf
lib/target/arm-unknown-linux-gnueabihf/release/libskinfixer.so: ${RUST_SOURCE_FILES}
mkdir -p lib/target/arm-unknown-linux-gnueabihf/release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-armhf-focal-builder release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-armhf-xenial release

# Release - Windows x86_64
lib/target/x86_64-pc-windows-gnu/release/libskinfixer.dll: ${RUST_SOURCE_FILES}
Expand All @@ -30,19 +30,19 @@ lib/target/x86_64-pc-windows-gnu/release/libskinfixer.dll: ${RUST_SOURCE_FILES}
# Release - Darwin x86_64
lib/target/x86_64-apple-darwin/release/libskinfixer.dylib: ${RUST_SOURCE_FILES}
mkdir -p lib/target/x86_64-apple-darwin/release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-darwin-builder release
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-darwin release

# Debug - Linux x86_64
lib/target/x86_64-unknown-linux-gnu/debug/libskinfixer.so: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-focal-builder
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-centos7

# Debug - Linux aarch64
lib/target/aarch64-unknown-linux-gnu/debug/libskinfixer.so: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-aarch64-focal-builder
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-aarch64-xenial

# Debug - Linux armhf
lib/target/arm-unknown-linux-gnueabihf/debug/libskinfixer.so: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-armhf-focal-builder
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-armhf-xenial

# Debug - Windows x86_64
lib/target/x86_64-pc-windows-gnu/debug/libskinfixer.dll: ${RUST_SOURCE_FILES}
Expand All @@ -53,14 +53,17 @@ lib/target/x86_64-pc-windows-gnu/debug/libskinfixer.dll: ${RUST_SOURCE_FILES}

# Debug - Darwin x86_64
lib/target/x86_64-apple-darwin/debug/libskinfixer.dylib: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-darwin-builder
docker run -v "${CURDIR}/lib/:/code/" docker-registry.k8s.array21.dev/rust-amd64-darwin

testjar: lib/target/x86_64-unknown-linux-gnu/debug/libskinfixer.so lib/target/aarch64-unknown-linux-gnu/debug/libskinfixer.so lib/target/arm-unknown-linux-gnueabihf/debug/libskinfixer.so lib/target/x86_64-pc-windows-gnu/debug/libskinfixer.dll lib/target/x86_64-apple-darwin/debug/libskinfixer.dylib
chmod +x gradlew;
rm -rf ./build/resources
./gradlew testjar

releasejar: lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-focal.so lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-bionic.so lib/target/x86_64-unknown-linux-gnu/release/libskinfixer-xenial.so lib/target/aarch64-unknown-linux-gnu/release/libskinfixer.so lib/target/arm-unknown-linux-gnueabihf/release/libskinfixer.so lib/target/x86_64-pc-windows-gnu/release/libskinfixer.dll lib/target/x86_64-apple-darwin/release/libskinfixer.dylib
releasejar: lib/target/x86_64-unknown-linux-gnu/release/libskinfixer.so lib/target/aarch64-unknown-linux-gnu/release/libskinfixer.so lib/target/arm-unknown-linux-gnueabihf/release/libskinfixer.so lib/target/x86_64-pc-windows-gnu/release/libskinfixer.dll lib/target/x86_64-apple-darwin/release/libskinfixer.dylib
chmod +x gradlew
rm -rf ./build/resources
./gradlew releasejar

clean:
sudo rm -rf build lib/target
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pluginVersion = 1.7.2
pluginVersion = 1.7.3
6 changes: 5 additions & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ version = "21.0.2"
default-features = false

[patch.crates-io.mysql]
git = "https://github.com/TheDutchMC/rust-mysql-simple"
git = "https://github.com/TheDutchMC/rust-mysql-simple"

[profile.release]
lto = true
panic = "abort"
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public void onSubcommand(SkinFixer plugin, CommandSender sender, String[] args)
}

if(args[0].contains("https://") || args[0].contains("http://")) {
String url = args[0].substring(0, args[0].indexOf('?'));
int indexOfQuery = args[0].indexOf('?');
String url = args[0].substring(0, indexOfQuery > 0 ? indexOfQuery : args[0].length());

int code = new AddNewSkin(plugin).addByUrl(url);
sender.sendMessage(ChatColor.GOLD + LangHandler.model.getCodeSkinAdded.replaceAll("%CODE%", ChatColor.RED + String.valueOf(code) + ChatColor.GOLD));
Expand Down

0 comments on commit bfc3512

Please sign in to comment.