Skip to content

Commit

Permalink
chore(build): fix release script bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Jun 16, 2014
1 parent a057734 commit 0b56a15
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 226 deletions.
23 changes: 15 additions & 8 deletions config/gulp-tasks/docs.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
var buildConfig = require('../build.config.js');
var cp = require('child_process');
var dgeni = require('dgeni');
var es = require('event-stream');
var fs = require('fs');
var gutil = require('gulp-util');
var htmlparser = require('htmlparser2');
var lunr = require('lunr');
var mkdirp = require('mkdirp');
var path = require('canonical-path');
var projectRoot = path.resolve(__dirname, '../..');
var semver = require('semver');
var yaml = require('js-yaml');

module.exports = function(gulp, argv) {
Expand Down Expand Up @@ -80,19 +84,22 @@ module.exports = function(gulp, argv) {
refId++;
}

var docPath = buildConfig.dist + '/ionic-site';
gutil.log('Reading docs from', gutil.colors.cyan(docPath));

return gulp.src([
'temp/ionic-site/docs/{components,guide,api,overview}/**/*.{md,html,markdown}',
'temp/ionic-site/docs/index.html',
'temp/ionic-site/getting-started/index.html',
'temp/ionic-site/tutorials/**/*.{md,html,markdown}',
'temp/ionic-site/_posts/**/*.{md,html,markdown}'
docPath + '/docs/{components,guide,api,overview}/**/*.{md,html,markdown}',
docPath + '/docs/index.html',
docPath + '/getting-started/index.html',
docPath + '/tutorials/**/*.{md,html,markdown}',
docPath + '/_posts/**/*.{md,html,markdown}'
])
.pipe(es.map(function(file, callback) {
//docs for gulp file objects: https://github.com/wearefractal/vinyl
var contents = file.contents.toString(); //was buffer

// Grab relative path from ionic-site root
var relpath = file.path.replace(/^.*?temp\/ionic-site\//, '');
var relpath = file.path.replace(RegExp('^.*?' + docPath + '/'), '');

// Read out the yaml portion of the Jekyll file
var yamlStartIndex = contents.indexOf('---');
Expand Down Expand Up @@ -186,9 +193,9 @@ module.exports = function(gulp, argv) {

})).on('end', function() {
// Write out as one json file
mkdirp.sync('temp/ionic-site/data');
mkdirp.sync(docPath + '/data');
fs.writeFileSync(
'temp/ionic-site/data/index.json',
docPath + '/data/index.json',
JSON.stringify({'ref': ref, 'index': idx.toJSON()})
);
});
Expand Down
2 changes: 1 addition & 1 deletion scripts/app-base/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ echo "#####"

function init {
APPBASE_DIR=$HOME/ionic-app-base
APPBASE_LIB_DIR=$HOME/www/lib/ionic
APPBASE_LIB_DIR=$APPBASE_DIR/www/lib/ionic

../clone/clone.sh --repository="driftyco/ionic-app-base" \
--directory="$APPBASE_DIR" \
Expand Down
1 change: 0 additions & 1 deletion scripts/release/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ function run {
cd ../..

node_modules/.bin/gulp build --release --dist="$RELEASE_DIR/release"
node_modules/.bin/gulp version --dist="$RELEASE_DIR/release"
node_modules/.bin/gulp changelog --dest="$RELEASE_DIR/CHANGELOG.md"

cp package.json $RELEASE_DIR
Expand Down
2 changes: 1 addition & 1 deletion scripts/site/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function run {

VERSION=$(readJsonProp "package.json" "version")
CODENAME=$(readJsonProp "package.json" "codename")
DATE=$(readJsonProp "dist/version.json" "date")
DATE=$(date +"%Y-%m-%d")

cd $SITE_DIR

Expand Down
2 changes: 1 addition & 1 deletion scripts/site/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run {
VERSION=$(readJsonProp "package.json" "version")

node_modules/.bin/gulp docs --doc-version="$VERSION_NAME" --dist=$SITE_DIR
node_modules/.bin/gulp docs-index
node_modules/.bin/gulp docs-index --dist=$SITE_DIR

cd $SITE_DIR

Expand Down
158 changes: 0 additions & 158 deletions scripts/travis/ci.sh

This file was deleted.

56 changes: 0 additions & 56 deletions scripts/travis/release-new-version.sh

This file was deleted.

0 comments on commit 0b56a15

Please sign in to comment.