diff options
| author | ruki <[email protected]> | 2020-06-27 00:35:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-26 21:31:01 +0800 |
| commit | 47477e14dedcb052b192b7d18ddcad9977d19002 (patch) | |
| tree | 6123c5120663fae618f6159ec1abab45044e1a86 /scripts/makepkg | |
| parent | 5f4df94934757ae2876d498500b1588fb5f06fb8 (diff) | |
fix deb/osxpkg artifacts
Diffstat (limited to 'scripts/makepkg')
| -rwxr-xr-x | scripts/makepkg | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/scripts/makepkg b/scripts/makepkg index 6c2bd1348..f9da83b0c 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -19,16 +19,21 @@ # # check -if [ $# -lt 2 ]; then - echo "Usage: ./scripts/makepkg [rpm|deb|osxpkg|pacman] [version]" +if [ $# -lt 1 ]; then + echo "Usage: ./scripts/makepkg [rpm|deb|osxpkg|pacman]" exit fi +xmakeroot=`pwd` +artifactsdir=$xmakeroot/artifacts +if [ ! -d $artifactsdir ]; then + mkdir $artifactsdir +fi # target target=$1 # version -version=$2 +version=`cat ./core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"` # arch arch=i386 @@ -45,17 +50,14 @@ fi # build first make build -# make xmake wrapper -echo "#/!bin/bash -export XMAKE_PROGRAM_DIR=/usr/local/share/xmake -/usr/local/share/xmake/xmake \"\$@\" -" > /tmp/xmake.sh -chmod 755 /tmp/xmake.sh - # make dep package using fpm fpm -s dir -t $target -n xmake -v $version -m "<[email protected]>" --description "A make-like build utility based on Lua" --url "xmake.io" --license Apache \ xmake=/usr/local/share/ \ - core/src/demo/demo.b=/usr/local/share/xmake/xmake \ - /tmp/xmake.sh=/usr/local/bin/xmake + core/src/demo/demo.b=/usr/local/bin/xmake +if [ "$target" == "osxpkg" ]; then + mv xmake-$version.pkg $artifactsdir/xmake.pkg +elif [ "$target" == "deb" ]; then + mv xmake-$version_amd64.deb $artifactsdir/xmake.deb +fi |
