Created verification hook (markdown)
							parent
							
								
									b46b9d41de
								
							
						
					
					
						commit
						af78d75a89
					
				
							
								
								
									
										48
									
								
								verification-hook.md
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
								
									
										
										
									
									
								
							
						
						
									
										48
									
								
								verification-hook.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,48 @@ | ||||
| If you want to use the verification hook (e.g. breaking change detection) you can provide your own in the `package.json`. | ||||
| 
 | ||||
| Add a `release` field and provide a path where `semantic-release` can require your verification hook: | ||||
| 
 | ||||
| ```json | ||||
| "release": { | ||||
|   "verification": "./lib/custom-verification" | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| or with extra options: | ||||
| 
 | ||||
| ```json | ||||
| "release": { | ||||
|   "verification": { | ||||
|     "name": "cracks", | ||||
|     "silent": true | ||||
|    } | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| The module should export a function that takes an `options` object and a `callback(err, ok)` function. | ||||
| 
 | ||||
| The `options` object contains the options defined in the `package.json` `release.verification` object and some default options: | ||||
| 
 | ||||
| ```json | ||||
| { | ||||
|   "name": "cracks", | ||||
|   "silent": true, | ||||
|   "type": "minor", | ||||
|   "commits": [ | ||||
|     { | ||||
|       "hash": "7ba1cb956f2efc2cd7e34f36cb8358baa09191b0", | ||||
|       "message": "fix(pre): improved logging\n" | ||||
|     }, | ||||
|     { | ||||
|       "hash": "1f70215ffe4ac70669f918dd520aa9c49d6d865b", | ||||
|       "message": "test(pre): verification hook\n" | ||||
|     } | ||||
|   ], | ||||
|   "version": "3.2.2", | ||||
|   "nextVersion": "3.3.0" | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| If you want to have an automatic breaking change detection you may use [cracks](https://github.com/christophwitzko/cracks). | ||||
| 
 | ||||
| Have a look at [the verification test hook](https://github.com/boennemann/semantic-release/blob/master/tests/lib/custom-verification.js) for a sample implementation. | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user