File tree 4 files changed +18
-5
lines changed
4 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -36,4 +36,4 @@ COPY . .
36
36
37
37
RUN cargo install --path .
38
38
39
- CMD ["bin_patch_gen" ]
39
+ CMD ["bin_patch_gen" , "-v" , "1.21.3" ]
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ services:
5
5
volumes :
6
6
- ./config.toml:/app/config.toml
7
7
- ./work:/app/run
8
+ - /tmp/bpg:/tmp/bin-patch-gen
8
9
mem_limit : 2G
9
10
tests :
10
11
container_name : sploon-bin-patch-gen-tests
@@ -13,4 +14,5 @@ services:
13
14
volumes :
14
15
- ./config.toml:/app/config.toml
15
16
- ./work:/app/run
16
- mem_limit : 2G
17
+ - /tmp/bpg:/tmp/bin-patch-gen
18
+ mem_limit : 2G
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ pub async fn run(
220
220
warn ! ( "{version} metadata is invalid or could not be read! Rebuilding..." ) ;
221
221
} else {
222
222
let patched_meta = patched_meta. unwrap ( ) ;
223
- if remote_meta. refs == patched_meta. commit_hashes && !force_build && library_file. exists ( ) {
223
+ if remote_meta. refs_eq ( patched_meta. commit_hashes ) && !force_build && library_file. exists ( ) {
224
224
info ! ( "Already built version {version}, skipping" ) ;
225
225
continue ;
226
226
}
Original file line number Diff line number Diff line change @@ -7,15 +7,26 @@ pub struct SpigotVersionMeta {
7
7
pub refs : SpigotVersionRefs ,
8
8
}
9
9
10
+ impl SpigotVersionMeta {
11
+ pub fn refs_eq ( & self , other : SpigotVersionRefs ) -> bool {
12
+ let refs = self . refs . clone ( ) ;
13
+
14
+ refs. build_data == other. build_data
15
+ && refs. bukkit == other. bukkit
16
+ && refs. craft_bukkit == other. craft_bukkit
17
+ && refs. spigot == other. spigot
18
+ }
19
+ }
20
+
10
21
#[ serial_pascal]
11
22
pub struct SpigotVersionRefs {
12
23
pub build_data : String ,
13
24
pub bukkit : String ,
14
25
pub craft_bukkit : String ,
15
- pub spigot : String
26
+ pub spigot : String ,
16
27
}
17
28
18
29
#[ serial]
19
30
pub struct SpigotBuildData {
20
- pub server_url : String
31
+ pub server_url : String ,
21
32
}
You can’t perform that action at this time.
0 commit comments