@@ -6,6 +6,7 @@ const assert = require('assert')
66const fs = require ( 'fs' )
77const { execSync } = require ( 'child_process' )
88const GitHub = require ( 'github' )
9+ const { GitProcess } = require ( 'dugite' )
910const nugget = require ( 'nugget' )
1011const pkg = require ( '../package.json' )
1112const pkgVersion = `v${ pkg . version } `
@@ -283,6 +284,7 @@ async function makeRelease (releaseToValidate) {
283284 // Fetch latest version of release before verifying
284285 draftRelease = await getDraftRelease ( pkgVersion , true )
285286 await validateReleaseAssets ( draftRelease )
287+ await tagLibCC ( )
286288 await publishRelease ( draftRelease )
287289 console . log ( `${ pass } SUCCESS!!! Release has been published. Please run ` +
288290 `"npm run publish-to-npm" to publish release to npm.` )
@@ -451,4 +453,23 @@ async function validateChecksums (validationArgs) {
451453 `shasums defined in ${ validationArgs . shaSumFile } .` )
452454}
453455
456+ async function tagLibCC ( ) {
457+ const tag = `electron-${ pkg . version } `
458+ const libccDir = path . join ( path . resolve ( __dirname , '..' ) , 'vendor' , 'libchromiumcontent' )
459+ console . log ( `Tagging release ${ tag } .` )
460+ let tagDetails = await GitProcess . exec ( [ 'tag' , '-a' , '-m' , tag , tag ] , libccDir )
461+ if ( tagDetails . exitCode === 0 ) {
462+ let pushDetails = await GitProcess . exec ( [ 'push' , '--tags' ] , libccDir )
463+ if ( pushDetails . exitCode === 0 ) {
464+ console . log ( `${ pass } Successfully tagged libchromiumcontent with ${ tag } .` )
465+ } else {
466+ console . log ( `${ fail } Error pushing libchromiumcontent tag ${ tag } : ` +
467+ `${ pushDetails . stderr } ` )
468+ }
469+ } else {
470+ console . log ( `${ fail } Error tagging libchromiumcontent with ${ tag } : ` +
471+ `${ tagDetails . stderr } ` )
472+ }
473+ }
474+
454475makeRelease ( args . validateRelease )
0 commit comments