Skip to content

Commit

Permalink
Release 2.0.60
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Jun 13, 2024
1 parent 9ca45bd commit 01c3e9f
Showing 1 changed file with 17 additions and 39 deletions.
56 changes: 17 additions & 39 deletions .github/julia/generate_binaries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01c3e9f

Please sign in to comment.