tmate/package_release.sh
2019-10-12 20:38:36 -04:00

15 lines
482 B
Bash
Executable File

#!/bin/bash
set -eux
VERSION=$1
PLATFORM=$2
RELEASE_NAME=tmate-$VERSION-static-linux-$PLATFORM
# This assumes the follow command has already been run:
# docker build . --tag local-$PLATFORM/tmate-build --build-arg PLATFORM=$PLATFORM
mkdir -p /tmp/tmate-release/$RELEASE_NAME
cd /tmp/tmate-release
docker run --rm local-$PLATFORM/tmate-build cat tmate > $RELEASE_NAME/tmate
chmod +x $RELEASE_NAME/tmate
tar -cf - $RELEASE_NAME | xz > tmate-$VERSION-static-linux-$PLATFORM.tar.xz