Skip to content

Commit 54a815d

Browse files
committed
Utils: Make Release.walk public
1 parent 2ac9706 commit 54a815d

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,16 @@ Gets the contents of `package.json` as an object.
202202

203203
Saves `package` to `package.json`, preserving indentation style.
204204

205+
#### walk( methods, done )
206+
207+
Executes the array of `methods` (minimum one element) step by step. For any
208+
given method, if that method accepts arguments (`method.length > 0`), it will
209+
pass a callback that the method needs to execute when done, making the method
210+
call async. Otherwise the method is assumed to be sync and the next method runs
211+
immediately.
212+
213+
Once all methods are executed, the `done` callback is executed.
214+
205215
### Other Properties
206216

207217
#### isTest

lib/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ Release.define({
5353
};
5454
},
5555

56-
_walk: function( methods, fn ) {
56+
walk: function( methods, fn ) {
5757
var method = methods.shift();
5858

5959
function next() {
6060
if ( !methods.length ) {
6161
return fn();
6262
}
6363

64-
Release._walk( methods, fn );
64+
Release.walk( methods, fn );
6565
}
6666

6767
if ( !method.length ) {

release.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ commonTasks = [
4545
function( fn ) {
4646
if ( Release.cdnPublish ) {
4747
Release._section( "publishing to jQuery CDN" )();
48-
Release._walk([
48+
Release.walk([
4949
Release._copyCdnArtifacts,
5050
Release.confirmReview,
5151
Release._pushToCdn
@@ -80,10 +80,10 @@ stableTasks = [
8080
Release._gatherContributors
8181
];
8282

83-
Release._walk( commonTasks, function() {
83+
Release.walk( commonTasks, function() {
8484
if ( Release.preRelease ) {
8585
return Release.complete();
8686
}
8787

88-
Release._walk( stableTasks, Release.complete );
88+
Release.walk( stableTasks, Release.complete );
8989
});

0 commit comments

Comments
 (0)