-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add scripts to automate publishing of releases, and deployment of…
- Loading branch information
1 parent
0407c5b
commit 5a09844
Showing
6 changed files
with
162 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as util from './util'; | ||
import { createBuilder } from './util'; | ||
import { Config, packages } from './config'; | ||
import * as shelljs from 'shelljs'; | ||
|
||
/** | ||
* Publish release to NPM on "latest" tag | ||
*/ | ||
export async function publishToNpm(config: Config) { | ||
for (let pkg of util.getTopLevelPackages(config)) { | ||
console.log(`Publishing @ngrx/${pkg}`); | ||
|
||
const cmd = [ | ||
'./node_modules/.bin/bazel run', | ||
`//modules/${pkg}:npm_package.publish`, | ||
'--', | ||
'--access=public', | ||
'--tag=latest', | ||
'--dry-run', | ||
]; | ||
|
||
shelljs.exec(cmd.join(' ')); | ||
} | ||
} | ||
|
||
const publishLatest = createBuilder([ | ||
['Publish packages on latest', publishToNpm], | ||
]); | ||
|
||
publishLatest({ | ||
scope: '@ngrx', | ||
packages, | ||
}).catch(err => { | ||
console.error(err); | ||
process.exit(1); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import * as util from './util'; | ||
import { createBuilder } from './util'; | ||
import { Config, packages } from './config'; | ||
import * as shelljs from 'shelljs'; | ||
|
||
/** | ||
* Publish release to NPM on "next" tag | ||
*/ | ||
export async function publishNextToNpm(config: Config) { | ||
for (let pkg of util.getTopLevelPackages(config)) { | ||
console.log(`Publishing @ngrx/${pkg}`); | ||
|
||
const cmd = [ | ||
'./node_modules/.bin/bazel run', | ||
`//modules/${pkg}:npm_package.publish`, | ||
'--', | ||
'--access=public', | ||
'--tag=next', | ||
]; | ||
|
||
shelljs.exec(cmd.join(' ')); | ||
} | ||
} | ||
|
||
const publishNext = createBuilder([ | ||
['Publish packages on next', publishNextToNpm], | ||
]); | ||
|
||
publishNext({ | ||
scope: '@ngrx', | ||
packages, | ||
}).catch(err => { | ||
console.error(err); | ||
process.exit(1); | ||
}); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Allow all URLs (see http://www.robotstxt.org/robotstxt.html) | ||
User-agent: * | ||
Disallow: | ||
Sitemap: https://angular.io/generated/sitemap.xml | ||
Sitemap: https://ngrx.io/generated/sitemap.xml |
This file contains 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