From 47477e14dedcb052b192b7d18ddcad9977d19002 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 27 Jun 2020 00:35:10 +0800 Subject: fix deb/osxpkg artifacts --- scripts/makepkg | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'scripts/makepkg') 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 "" --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 -- cgit v1.3.1