diff options
| author | ruki <[email protected]> | 2023-11-17 23:54:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-17 23:54:59 +0800 |
| commit | 14f1ed5587ebe19a644f4832c059ff4ec830f6df (patch) | |
| tree | 27e9173c19fe656f4f96497133748a5df2838c00 /xmake/plugins | |
| parent | 45e0cdff6efa8afa9a097b40fef9539c8561b779 (diff) | |
add targz format
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/pack/archive.lua | 3 | ||||
| -rw-r--r-- | xmake/plugins/pack/targz/main.lua | 26 | ||||
| -rw-r--r-- | xmake/plugins/pack/xpack.lua | 5 |
3 files changed, 30 insertions, 4 deletions
diff --git a/xmake/plugins/pack/archive.lua b/xmake/plugins/pack/archive.lua index 585fc7dc1..2db7a1e3c 100644 --- a/xmake/plugins/pack/archive.lua +++ b/xmake/plugins/pack/archive.lua @@ -80,7 +80,6 @@ function _pack_archive(package) end function main(package) - cprint("packing %s", package:outputfile()) - _pack_archive(package) + cprint("packing %s .. ", package:outputfile()) end diff --git a/xmake/plugins/pack/targz/main.lua b/xmake/plugins/pack/targz/main.lua new file mode 100644 index 000000000..fe511bff9 --- /dev/null +++ b/xmake/plugins/pack/targz/main.lua @@ -0,0 +1,26 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015-present, TBOOX Open Source Group. +-- +-- @author ruki +-- @file main.lua +-- + +-- imports +import(".archive") + +function main(package) + archive(package) +end diff --git a/xmake/plugins/pack/xpack.lua b/xmake/plugins/pack/xpack.lua index 4d32d6c08..0c255c6b2 100644 --- a/xmake/plugins/pack/xpack.lua +++ b/xmake/plugins/pack/xpack.lua @@ -323,8 +323,9 @@ end -- get the output filename function xpack:filename() local extensions = { - nsis = ".exe", - zip = ".zip" + nsis = ".exe", + zip = ".zip", + targz = ".tar.gz" } local extension = extensions[self:format()] or "" return self:basename() .. extension |
