Separate source maps, upload script

This commit is contained in:
Vincent Fiduccia 2014-12-12 18:10:19 -07:00
parent 1e6f6f88c8
commit 2a53e912f2
6 changed files with 29 additions and 3 deletions

View File

@ -13,6 +13,7 @@ var pkg = require('./package.json');
var DIST = 'dist/';
var VERSION_DIST = DIST+pkg.version+'/';
var CDN = 'cdn.rancher.io/api-ui';
gulp.task('default', ['build']);
@ -57,7 +58,7 @@ gulp.task('js', ['templates','partials'], function() {
.pipe(gulpConcat('ui.js'))
.pipe(gulp.dest(VERSION_DIST))
.pipe(gulpUglify())
.pipe(gulpMap.write())
.pipe(gulpMap.write('./'))
.pipe(gulpRename({suffix: '.min'}))
.pipe(gulp.dest(VERSION_DIST));
});
@ -84,7 +85,7 @@ gulp.task('css', function() {
return gulp.src('styles/ui.scss')
.pipe(gulpMap.init())
.pipe(gulpSass())
.pipe(gulpMap.write())
.pipe(gulpMap.write('./'))
.pipe(gulp.dest(VERSION_DIST))
.pipe(gulpRename({suffix: '.min'}))
.pipe(gulp.dest(VERSION_DIST));

View File

@ -1,6 +1,6 @@
{
"name": "api-ui",
"version": "1.0.0-alpha.2",
"version": "1.0.0",
"description": "Embedded UI for any service that implements the Rancher API spec",
"contributors": [
"Go Daddy Operating Company, LLC. (http://godaddy.com)",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

25
scripts/upload Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
set -e
# cd to app root
CWD=$(dirname $0)
if [ `basename $(pwd)` = 'scripts' ]; then
cd ../
else
cd `dirname $CWD`
fi
function exec() {
$@
if [ $? -ne 0 ]; then
echo "Command: $@ failed"
exit 2
fi
}
VERSION=$(cat package.json | grep version | cut -f4 -d'"' | sed 's/-/_/g')
BUILD_DIR="dist/${VERSION}"
CDN="cdn.rancher.io/api-ui"
echo "Uploading..."
exec gsutil -m cp -R $BUILD_DIR "gs://${CDN}/"