Last active
August 29, 2015 14:05
-
-
Save corbanbrook/5747dea4caed33bc89ba to your computer and use it in GitHub Desktop.
Upgrade all sites from one cr to another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fromTag = 'v0.1.19'; | |
| toTag = 'v0.1.20'; | |
| $injector.get('CodeRevisionResource').all().then(function(codeRevisions) { | |
| cr = _.findWhere(codeRevisions, {tag: fromTag}); | |
| $injector.get('SiteResource').indexByCodeRevision(cr.id, true).then(function(sites) { | |
| _.each(sites, function(site) { | |
| site.upgrade(toTag, '[email protected]:pressly/ng-pressilla.git').then(function(res) { | |
| console.log(res.id, 'scheduled for upgrade'); | |
| }); | |
| }); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment