Browse Source

Admin task iteration

pull/1875/head
jlukic 9 years ago
parent
commit
268b30a017
6 changed files with 20 additions and 108 deletions
  1. 6
      RELEASE-NOTES.md
  2. 64
      tasks/admin/register-repos.js
  3. 29
      tasks/admin/release-all.js
  4. 5
      tasks/admin/release.js
  5. 23
      tasks/collections/admin.js
  6. 1
      tasks/config/admin/release.js

6
RELEASE-NOTES.md

@ -1,5 +1,11 @@
## RELEASE NOTES
### Version 1.9.3 - February 19, 2015
- **Tab** - Fixed bug when loading `remote` content with `tab` where current tab would not hide while loading
- **Tab** - Tab with remote content and `auto: true` now removes duplicate slashes from url path
- **API** - Simplified `api` debug output to console to more clearly label url and data sent
### Version 1.9.2 - February 19, 2015
Added new repositories for css and less only versions, can be installed with

64
tasks/admin/register-repos.js

@ -1,64 +0,0 @@
/*******************************
Register PM
*******************************/
/*
Task to register component repos with Package Managers
* Registers component with bower
* Registers component with NPM
*/
var
// node dependencies
process = require('child_process'),
// config
release = require('../config/admin/release'),
total = release.components.length,
index = -1,
stream,
stepRepo
;
module.exports = function(callback) {
console.log('Registering repos with package managers');
// Do Git commands synchronously per component, to avoid issues
stepRepo = function() {
index = index + 1;
if(index >= total) {
return;
}
var
component = release.components[index],
outputDirectory = release.outputRoot + component + '/',
capitalizedComponent = component.charAt(0).toUpperCase() + component.slice(1),
packageName = release.packageRoot + component,
repoName = release.repoRoot + capitalizedComponent,
gitURL = 'https://github.com/' + release.org + '/' + repoName + '.git',
exec = process.exec,
execSettings = {cwd: outputDirectory},
registerBower = 'bower register ' + packageName + ' ' + gitURL,
updateNPM = 'npm publish'
;
/* Register with Bower */
/* One Time
exec(registerBower, execSettings, function(err, stdout, stderr) {
stepRepo();
});
*/
/* Register with NPM */
exec(updateNPM, execSettings, function(err, stdout, stderr) {
console.log(err, stdout, stderr);
stepRepo();
});
};
stepRepo();
};

29
tasks/admin/release-all.js

@ -1,29 +0,0 @@
/*******************************
Release All
*******************************/
/*
This task update all SUI individual component repos with new versions of components
* Initializes repositories with current versions
* Creates local files at ../components/ with each repo for release
* Commits changes from create components
* Registers new versions with NPM Publish
*/
var
runSequence = require('run-sequence')
;
/* Release All */
module.exports = function() {
runSequence(
'build', // build Semantic
'init components', // sync with current github version
'create components', // update each repo
'update components' // commit changes to github
);
};

5
tasks/admin/release.js

@ -7,8 +7,6 @@
* Initializes repositories with current versions
* Creates local files at ../distributions/ with each repo for release
* Commits changes from create components
* Registers new versions with NPM Publish
*/
@ -23,7 +21,8 @@ module.exports = function() {
'build', // build Semantic
'init distributions', // sync with current github version
'create distributions', // update each repo with changes from master repo
'update distributions' // commit changes to github
'init components', // sync with current github version
'create components' // update each repo
);
};

23
tasks/collections/admin.js

@ -26,25 +26,24 @@ module.exports = function(gulp) {
createDistributions = require('../admin/distributions/create'),
updateDistributions = require('../admin/distributions/update'),
// one time register with PM
registerRepos = require('../admin/register-repos'),
// meta tasks
releaseAll = require('../admin/release-all'),
release = require('../admin/release')
release = require('../admin/release'),
publish = require('../admin/publish'),
register = require('../admin/register')
;
gulp.task('release', 'Publishes only packaged releases', release);
gulp.task('release all', 'Publishes all releases (components, package)', releaseAll);
/* Release */
gulp.task('init distributions', 'Grabs each component from GitHub', initDistributions);
gulp.task('create distributions', 'Updates files in each repo', createDistributions);
gulp.task('update distributions', 'Commits component updates from create to GitHub', updateDistributions);
gulp.task('init components', 'Grabs each component from GitHub', initComponents);
gulp.task('create components', 'Updates files in each repo', createComponents);
/* Publish */
gulp.task('update distributions', 'Commits component updates from create to GitHub', updateDistributions);
gulp.task('update components', 'Commits component updates from create to GitHub', updateComponents);
gulp.task('register repos', 'Registers all packages with NPM', registerRepos);
/* Tasks */
gulp.task('release', 'Stages changes in GitHub repos for all distributions', release);
gulp.task('publish', 'Publishes all releases (components, package)', publish);
gulp.task('register', 'Registers all packages with NPM', register);
};

1
tasks/config/admin/release.js

@ -61,6 +61,7 @@ module.exports = {
// components that get separate repositories for bower/npm
components : [
'accordion',
'ad',
'api',
'breadcrumb',
'button',

Loading…
Cancel
Save