diff options
author | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2016-04-20 14:34:12 +0800 |
---|---|---|
committer | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2016-04-20 14:54:49 +0800 |
commit | f28a1c58f3a91c7ed97e1fbf1598a69c234cf9cb (patch) | |
tree | e1669cabd5a694348266718b02b1183a39891e8f /build_tools | |
parent | 2f8d0e9aba3662fcb1032ffe33bc6faf2e04eb8f (diff) |
build_tools/make_pkg: fixups for versioning and Xcode preferences
[ci skip]
Diffstat (limited to 'build_tools')
-rwxr-xr-x | build_tools/make_pkg.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/build_tools/make_pkg.sh b/build_tools/make_pkg.sh index 1b041bdc..7bc7c2ee 100755 --- a/build_tools/make_pkg.sh +++ b/build_tools/make_pkg.sh @@ -1,9 +1,13 @@ #!/bin/sh -VERSION=`sed -E -n 's/^.*PACKAGE_VERSION "([0-9.]+)"/\1/p' osx/config.h` +VERSION=`git describe --always --dirty 2>/dev/null` if test -z "$VERSION" ; then - echo "Could not get version from osx/config.h" - exit 1 + echo "Could not get version from git" + VERSION=`sed -E -n 's/^.*PACKAGE_VERSION "([0-9a-z.\-]+)"/\1/p' osx/config.h` + if test -z "$VERSION"; then + echo "Could not get version from osx/config.h" + exit 1 + fi fi echo "Version is $VERSION" @@ -20,11 +24,11 @@ mkdir -p /tmp/fish_pkg/root /tmp/fish_pkg/intermediates /tmp/fish_pkg/dst xcodebuild install -scheme install_tree -configuration Release DSTROOT=/tmp/fish_pkg/root/ pkgbuild --scripts build_tools/osx_package_scripts --root /tmp/fish_pkg/root/ --identifier 'com.ridiculousfish.fish-shell-pkg' --version "$VERSION" /tmp/fish_pkg/intermediates/fish.pkg -productbuild --package-path /tmp/fish_pkg/intermediates --distribution build_tools/osx_distribution.xml --resources build_tools/osx_package_resources/ ~/fish_built/fish.pkg +productbuild --package-path /tmp/fish_pkg/intermediates --distribution build_tools/osx_distribution.xml --resources build_tools/osx_package_resources/ ~/fish_built/fish-$VERSION.pkg # Make the app -xcodebuild -scheme fish.app -configuration Release DSTROOT=/tmp/fish_app/ +xcodebuild -scheme fish.app -configuration Release DSTROOT=/tmp/fish_app/ SYMROOT=DerivedData/fish/Build/Products rm -f ~/fish_built/fish.app.zip cd DerivedData/fish/Build/Products/Release/ -zip -r ~/fish_built/fish.app.zip fish.app +zip -r ~/fish_built/fish-$VERSION.app.zip fish.app |