Commit 9a26e865 authored by Drew's avatar Drew

Modify filenames for compressed atbin

new format is {name}-{version?}-{target}.atbin.tar.xz
parent f6c9b85e
......@@ -156,12 +156,21 @@ class PackageAtbin:Tool {
try! s.write(to: atbinPath.join(Path("compiled.atpkg")))
if task[Options.Compress.rawValue]?.bool == true {
let tarxz: String
if let v = task.package.version {
tarxz = "bin/\(name)-\(v)-\(Platform.targetPlatform).atbin.tar.xz"
}
else {
tarxz = "bin/\(name)-\(Platform.targetPlatform).atbin.tar.xz"
}
let cmd: String
switch Platform.hostPlatform {
case .OSX:
cmd = "tar c --options \"xz:compression-level=9\" -Jf bin/\(name).atbin.tar.xz bin/\(name).atbin -C bin"
cmd = "tar c --options \"xz:compression-level=9\" -Jf \(tarxz) bin/\(name).atbin -C bin"
case .Linux:
cmd = "XZ_OPT=-8 tar cJf bin/\(name).atbin.tar.xz bin/\(name).atbin -C bin"
cmd = "XZ_OPT=-8 tar cJf \(tarxz) bin/\(name).atbin -C bin"
default:
fatalError("Unsupported host platform \(Platform.hostPlatform)")
}
......
......@@ -14,7 +14,7 @@
(package
:name "atbin"
:version "1.0"
:tasks {
:slib {
:tool "atllbuild"
......
......@@ -130,11 +130,11 @@ if [ ! -f "bin/staticatbin.atbin/slib.a" ]; then
exit 1
fi
if [ ! -f "bin/dynamicatbin.atbin.tar.xz" ]; then
if [ ! -f "bin/dynamicatbin-1.0-osx.atbin.tar.xz" ]; then
echo "Missing compressed atbin"
exit 1
fi
tar xf bin/dynamicatbin.atbin.tar.xz
tar xf bin/dynamicatbin-1.0-osx.atbin.tar.xz
if [ "$UNAME" == "Darwin" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment