diff --git a/.github/julia/generate_binaries.jl b/.github/julia/generate_binaries.jl index 409c86e..05eb6ec 100644 --- a/.github/julia/generate_binaries.jl +++ b/.github/julia/generate_binaries.jl @@ -43,49 +43,27 @@ for (platform, libdir, ext) in platforms mkdir("products/$platform") run(`tar -xzf products/$(tarball_name) -C products/$platform`) - if isfile("products/$platform/deps.tar.gz") - # Unzip the tarball of the dependencies - run(`tar -xzf products/$platform/deps.tar.gz -C products/$platform`) + # Create the archives *_binaries + isfile("$(package)_binaries.$version2.$platform.tar.gz") && rm("$(package)_binaries.$version2.$platform.tar.gz") + isfile("$(package)_binaries.$version2.$platform.zip") && rm("$(package)_binaries.$version2.$platform.zip") + cd("products/$platform") - # Copy the license of each dependency - for folder in readdir("products/$platform/deps/licenses") - cp("products/$platform/deps/licenses/$folder", "products/$platform/share/licenses/$folder") - end - rm("products/$platform/deps/licenses", recursive=true) - - # Copy the shared library of each dependency - for file in readdir("products/$platform/deps") - cp("products/$platform/deps/$file", "products/$platform/$libdir/$file") - end - - # Remove the folder used to unzip the tarball of the dependencies - rm("products/$platform/deps", recursive=true) - rm("products/$platform/deps.tar.gz", recursive=true) - - # Create the archives *_binaries - isfile("$(package)_binaries.$version2.$platform.tar.gz") && rm("$(package)_binaries.$version2.$platform.tar.gz") - isfile("$(package)_binaries.$version2.$platform.zip") && rm("$(package)_binaries.$version2.$platform.zip") - cd("products/$platform") - - # Create a folder with the version number of the package - mkdir("$(package)_binaries.$version2") - for folder in ("share", "modules", "lib") - cp(folder, "$(package)_binaries.$version2/$folder") - end - - cd("$(package)_binaries.$version2") - if ext == "dll" - run(`zip -r --symlinks ../../../$(package)_binaries.$version2.$platform.zip share modules lib`) - else - run(`tar -czf ../../../$(package)_binaries.$version2.$platform.tar.gz share modules lib`) - end - cd("../../..") + # Create a folder with the version number of the package + mkdir("$(package)_binaries.$version2") + for folder in ("share", "modules", "lib") + cp(folder, "$(package)_binaries.$version2/$folder") + end - # Remove the folder used to unzip the tarball generated by BinaryBuilder.jl - rm("products/$platform", recursive=true) + cd("$(package)_binaries.$version2") + if ext == "dll" + run(`zip -r --symlinks ../../../$(package)_binaries.$version2.$platform.zip share modules lib`) else - @warn("The tarball deps.tar.gz is missing in $(tarball_name)!") + run(`tar -czf ../../../$(package)_binaries.$version2.$platform.tar.gz share modules lib`) end + cd("../../..") + + # Remove the folder used to unzip the tarball generated by BinaryBuilder.jl + rm("products/$platform", recursive=true) else @warn("The tarball for the platform $platform was not generated!") end