mirror of https://github.com/actions/setup-go.git
				
				
				
			Add problem matcher
This commit is contained in:
		
							parent
							
								
									886b49b2b3
								
							
						
					
					
						commit
						5f2246e3c5
					
				|  | @ -0,0 +1,16 @@ | |||
| { | ||||
|     "problemMatcher": [ | ||||
|         { | ||||
|             "owner": "go", | ||||
|             "pattern": [ | ||||
|                 { | ||||
|                     "regexp": "^([^:]*: )?((.:)?[^:]*):(\\d+)(:(\\d+))?: (.*)$", | ||||
|                     "file": 2, | ||||
|                     "line": 4, | ||||
|                     "column": 6, | ||||
|                     "message": 7 | ||||
|                 } | ||||
|             ] | ||||
|         } | ||||
|     ] | ||||
| } | ||||
|  | @ -3,7 +3,7 @@ | |||
| This action sets by Go environment for use in actions by: | ||||
| 
 | ||||
| - optionally downloading and caching a version of Go | ||||
| - TODO: registering problem matchers for error output  | ||||
| - registering problem matchers for error output  | ||||
| - TODO: configuring proxy if the runner is configured to use a proxy (coming with private runners) | ||||
| 
 | ||||
| # License | ||||
|  |  | |||
|  | @ -16,7 +16,8 @@ var __importStar = (this && this.__importStar) || function (mod) { | |||
| }; | ||||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||||
| const core = __importStar(require("@actions/core")); | ||||
| // import * as installer from './installer';
 | ||||
| const installer = __importStar(require("./installer")); | ||||
| const path = __importStar(require("path")); | ||||
| function run() { | ||||
|     return __awaiter(this, void 0, void 0, function* () { | ||||
|         try { | ||||
|  | @ -26,10 +27,11 @@ function run() { | |||
|             //
 | ||||
|             const version = core.getInput('version'); | ||||
|             if (version) { | ||||
|                 // await installer.getGo(version);
 | ||||
|                 yield installer.getGo(version); | ||||
|             } | ||||
|             // TODO: setup proxy from runner proxy config
 | ||||
|             // TODO: problem matchers registered
 | ||||
|             const matchersPath = path.join(__dirname, '..', '.github'); | ||||
|             console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`); | ||||
|         } | ||||
|         catch (error) { | ||||
|             core.setFailed(error.message); | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| import * as core from '@actions/core'; | ||||
| // import * as installer from './installer';
 | ||||
| import * as installer from './installer'; | ||||
| import * as path from 'path'; | ||||
| 
 | ||||
| async function run() { | ||||
|   try { | ||||
|  | @ -9,11 +10,13 @@ async function run() { | |||
|     //
 | ||||
|     const version = core.getInput('version'); | ||||
|     if (version) { | ||||
|       // await installer.getGo(version);
 | ||||
|       await installer.getGo(version); | ||||
|     } | ||||
| 
 | ||||
|     // TODO: setup proxy from runner proxy config
 | ||||
|     // TODO: problem matchers registered
 | ||||
| 
 | ||||
|     const matchersPath = path.join(__dirname, '..', '.github'); | ||||
|     console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`); | ||||
|   } catch (error) { | ||||
|     core.setFailed(error.message); | ||||
|   } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Danny McCormick
						Danny McCormick