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 | |
| parent | 5f4df94934757ae2876d498500b1588fb5f06fb8 (diff) | |
fix deb/osxpkg artifacts
| -rw-r--r-- | .github/workflows/linux.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/macos.yml | 4 | ||||
| -rwxr-xr-x | scripts/makepkg | 26 |
3 files changed, 18 insertions, 16 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 887d3fd55..845c78810 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -36,12 +36,12 @@ jobs: sudo apt-get install -y ruby ruby-dev rubygems build-essential sudo gem install --no-document fpm git submodule update --init - scripts/makepkg deb latest + scripts/makepkg deb # upload artifacts - uses: actions/upload-artifact@v2 with: name: xmake-latest.amd64.deb - path: xmake_latest_amd64.deb + path: artifacts/xmake.deb # publish release - name: publish diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 82c9072a1..2b239784f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -36,14 +36,14 @@ jobs: brew install gnu-tar gem install --no-document fpm git submodule update --init - scripts/makepkg osxpkg latest + scripts/makepkg osxpkg scripts/archive-all scripts/makeself/build-runfile.sh # upload artifacts - uses: actions/upload-artifact@v2 with: name: xmake-latest.macosx.pkg - path: xmake-latest.pkg + path: artifacts/xmake.pkg - uses: actions/upload-artifact@v2 with: name: xmake-latest.gz.run 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 |
