* Invokes the `ng-dev release info` command in order to retrieve information * about the release for the currently checked-out branch. * * This is useful to e.g. determine whether a built package is currently * denoted as experimental or not.
(projectDir: string)
| 138 | * denoted as experimental or not. |
| 139 | */ |
| 140 | static async invokeReleaseInfo(projectDir: string): Promise<ReleaseInfoJsonStdout> { |
| 141 | try { |
| 142 | const {stdout} = await this._spawnNpmScript( |
| 143 | ['ng-dev', 'release', 'info', '--json'], |
| 144 | projectDir, |
| 145 | {mode: 'silent'}, |
| 146 | ); |
| 147 | |
| 148 | // The `ng-dev release info` command prints a JSON object to stdout. |
| 149 | return JSON.parse(stdout.trim()) as ReleaseInfoJsonStdout; |
| 150 | } catch (e) { |
| 151 | Log.error(e); |
| 152 | Log.error( |
| 153 | ` ✘ An error occurred while retrieving the release information for ` + |
| 154 | `the currently checked-out branch.`, |
| 155 | ); |
| 156 | throw new FatalReleaseActionError(); |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | /** |
| 161 | * Invokes the `ng-dev release precheck` command in order to validate the |