From f4244690faad4d651b20c24851ebd7d75fb45dd1 Mon Sep 17 00:00:00 2001 From: Steve Hoffman Date: Thu, 12 May 2016 20:25:03 -0500 Subject: [PATCH] add package script -- move to travis uploads later --- .gitignore | 1 + README.md | 9 +++++++-- package.sh | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100755 package.sh diff --git a/.gitignore b/.gitignore index fa8d85a..0a5a5cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ Cargo.lock target +*.zip diff --git a/README.md b/README.md index 7da34e4..b97b30d 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,14 @@ A [liquid template](http://liquidmarkup.org/) command line tool. ## Compile To compile for ubuntu/amazon linux: + ``` -docker run -v `pwd`:/source -ti schickling/rust cargo build --release +% docker run --rm -v `pwd`:/source -ti schickling/rust cargo build --release +[snip] +% file target/release/limpet +target/release/limpet: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, not stripped ``` -The binary will be `target/release/limpet` + +The binary will be `target/release/limpet` and is currently under around 2MB TODO: publish via Travis-CI \ No newline at end of file diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..df63ea0 --- /dev/null +++ b/package.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# finish this upload part later... +#if [ -z ${BINTRAY_API_KEY} ]; then +# echo "BINTRAY_API_KEY environment not set." +# exit 1 +#fi + +if [ -z +VERSION=`grep '^version' Cargo.toml | cut -d '"' -f 2` +echo "Packaging version ${VERSION}..." +cargo clean +docker run --rm -v `pwd`:/source -ti schickling/rust cargo build --release +zip -j limpet_${VERSION}_linux_amd64.zip target/release/limpet + +#curl -T limpet_${VERSION}_linux_amd64.zip -ubacoboy:${BINTRAY_API_KEY} -H "X-Bintray-Package:limpet" -H "X-Bintray-Version:${VERSION}" https://api.bintray.com/content/bacoboy/limpet/limpet +