From 874123bbfa98bb3635fb22468fa915509d8f04f6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 24 Feb 2016 18:41:30 +0000 Subject: [PATCH] Move package script out and make it tar into a versioned top level directory. It may as well be a shell script since it's unix specific anyway, and maintaining it inside package.json is now impractical. --- package.json | 2 +- scripts/package.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 scripts/package.sh diff --git a/package.json b/package.json index ddbc4ee1e8..56c9f21dc4 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:compile": "babel --source-maps -d lib src", "build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js", "build": "npm run build:css && npm run build:compile && npm run build:bundle", - "package": "npm run build && mkdir -p packages && tar chvzf packages/vector-`git describe --dirty --tags || echo unknown`.tar.gz vector", + "package": "scripts/package.sh", "start:js": "webpack -w src/vector/index.js vector/bundle.js", "start:js:prod": "NODE_ENV=production webpack -w src/vector/index.js vector/bundle.js", "start:skins:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css", diff --git a/scripts/package.sh b/scripts/package.sh new file mode 100755 index 0000000000..e1f5f3c3cd --- /dev/null +++ b/scripts/package.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +version=`git describe --dirty --tags || echo unknown` + +npm run build +mkdir -p packages +ln -s vector vector-$version +tar chvzf packages/vector-$version.tar.gz vector-$version +rm vector-$version + +echo +echo "Packaged packages/vector-$version.tar.gz"