Sha256: 17a486ffc477ff520861459570f8e26c06680af6a5d0670d58952134031c5e1b

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

#!/bin/bash
#/ Usage: script/packages/mac [VERSION]
#/
#/ WARNING: You should not need to call this directly. Please create packages using
#/ `script/package [platform]` or `bundle exec rake package[platform]`
#/
#/ Builds a mac distributable package for licensed for a given licensed VERSION.
#/ Packages are of the form licensed-$VERSION-darwin-x64.tar.gz and contain a `./licensed` executable
#/ Built packages are placed in the <root>/pkg directory.
#/
#/ Must be called from a Mac OS.
#/
#/ OPTIONS:
#/   [VERSION]         (optional, default to current git branch or SHA1) version of licensed to build exe at
#/

set -euo pipefail

if [[ "$(uname -s)" != "Darwin" ]]; then
  echo "A Mac OS is required to build a licensed executable for mac" >&2
  exit 1
fi

BASE_DIR="$(cd "$(dirname $0)/../.." && pwd)"
RUBYC="$BASE_DIR/bin/rubyc-darwin"

brew update
brew list "squashfs" &>/dev/null || brew install "squashfs"

if [ ! -f "$RUBYC" ]; then
  mkdir -p "$(dirname "$RUBYC")"
  curl -L http://enclose.io/rubyc/rubyc-darwin-x64.gz | gunzip > "$RUBYC"
  chmod +x "$RUBYC"
fi

export RUBYC
"$BASE_DIR"/script/packages/build

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
licensed-2.3.1 script/packages/mac
licensed-2.3.0 script/packages/mac
licensed-2.2.0 script/packages/mac
licensed-2.1.0 script/packages/mac