@@ -13,9 +13,18 @@ const VSIX_SOURCE_PATH = core.getInput('extension-source-file', {
1313} )
1414const BUILD_NUMBER = core . getInput ( 'build-number' ) || github . context . runNumber
1515const NOW = new Date ( )
16+ const VERSION = `${ NOW . getFullYear ( ) } .${
17+ NOW . getMonth ( ) + 1
18+ } .${ NOW . getDate ( ) } .${ BUILD_NUMBER } `
1619
1720async function run ( ) : Promise < void > {
1821 try {
22+ console . log ( "********************************" )
23+ console . log ( `Version Evaluted = ${ VERSION } ` )
24+ console . log ( "********************************" )
25+
26+ core . setOutput ( 'version' , VERSION )
27+
1928 if ( IS_WINDOWS === false ) {
2029 core . setFailed (
2130 'action-vs-vsix-versioner can only be run on Windows-based runners'
@@ -33,15 +42,10 @@ async function run(): Promise<void> {
3342 return
3443 }
3544
36- const VERSION = `${ NOW . getFullYear ( ) } .${
37- NOW . getMonth ( ) + 1
38- } .${ NOW . getDate ( ) } .${ BUILD_NUMBER } `
39- core . setOutput ( 'version' , VERSION )
40-
4145 fs . readFile (
4246 VSIX_MANIFEST_PATH ,
4347 { encoding : 'utf-8' } ,
44- function ( manifestReadError , data ) {
48+ function ( manifestReadError : any , data : any ) {
4549 if ( manifestReadError ) {
4650 core . setFailed (
4751 `Unable to READ VSIX Manifest. Error: '${ manifestReadError } '`
@@ -68,7 +72,7 @@ async function run(): Promise<void> {
6872 fs . writeFile (
6973 VSIX_MANIFEST_PATH ,
7074 xmlContent ,
71- function ( manifestWriteError ) {
75+ function ( manifestWriteError : any ) {
7276 if ( manifestWriteError ) {
7377 core . setFailed (
7478 `Unable to UPDATE VSIX Manifest. Error: '${ manifestWriteError } '`
@@ -86,7 +90,7 @@ async function run(): Promise<void> {
8690 fs . readFile (
8791 VSIX_SOURCE_PATH ,
8892 { encoding : 'utf-8' } ,
89- function ( sourceReadError , data ) {
93+ function ( sourceReadError : any , data : string ) {
9094 if ( sourceReadError ) {
9195 core . setFailed (
9296 `Unable to READ VSIX Source File. Error: '${ sourceReadError } '`
@@ -98,7 +102,7 @@ async function run(): Promise<void> {
98102 fs . writeFile (
99103 VSIX_SOURCE_PATH ,
100104 updatedData ,
101- function ( sourceWriteError ) {
105+ function ( sourceWriteError : any ) {
102106 if ( sourceWriteError ) {
103107 core . setFailed (
104108 `Unable to UPDATE VSIX Source File. Error: '${ sourceWriteError } '`
0 commit comments