feat(verify): added support for parsing hosted gitlab and other repo urls
Closes #114
This commit is contained in:
		
							parent
							
								
									8491deb5c6
								
							
						
					
					
						commit
						66454e7e46
					
				| @ -13,6 +13,7 @@ | ||||
|     "path": "node_modules/cz-conventional-changelog/" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@bahmutov/parse-github-repo-url": "^0.1.0", | ||||
|     "@semantic-release/commit-analyzer": "^2.0.0", | ||||
|     "@semantic-release/condition-travis": "^5.0.0", | ||||
|     "@semantic-release/error": "^1.0.0", | ||||
| @ -26,7 +27,6 @@ | ||||
|     "normalize-package-data": "^2.3.4", | ||||
|     "npmconf": "^2.1.2", | ||||
|     "npmlog": "^2.0.0", | ||||
|     "parse-github-repo-url": "^1.0.0", | ||||
|     "require-relative": "^0.8.7", | ||||
|     "run-auto": "^1.1.2", | ||||
|     "run-series": "^1.1.3", | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| var parseSlug = require('parse-github-repo-url') | ||||
| var parseSlug = require('@bahmutov/parse-github-repo-url') | ||||
| 
 | ||||
| var SemanticReleaseError = require('@semantic-release/error') | ||||
| 
 | ||||
|  | ||||
| @ -2,7 +2,7 @@ var url = require('url') | ||||
| 
 | ||||
| var gitHead = require('git-head') | ||||
| var GitHubApi = require('github') | ||||
| var parseSlug = require('parse-github-repo-url') | ||||
| var parseSlug = require('@bahmutov/parse-github-repo-url') | ||||
| 
 | ||||
| module.exports = function (config, cb) { | ||||
|   var pkg = config.pkg | ||||
|  | ||||
| @ -41,6 +41,22 @@ test('verify pkg, options and env', function (t) { | ||||
|     tt.end() | ||||
|   }) | ||||
| 
 | ||||
|   t.test('dry run verification for gitlab repo', function (tt) { | ||||
|     var noErrors = verify({ | ||||
|       options: {debug: true}, | ||||
|       pkg: { | ||||
|         name: 'package', | ||||
|         repository: { | ||||
|           url: 'http://gitlab.corp.com/whats/up.git' | ||||
|         } | ||||
|       } | ||||
|     }) | ||||
| 
 | ||||
|     console.log(noErrors) | ||||
|     tt.is(noErrors.length, 0) | ||||
|     tt.end() | ||||
|   }) | ||||
| 
 | ||||
|   t.test('publish verification', function (tt) { | ||||
|     var noErrors = verify({ | ||||
|       env: {NPM_TOKEN: 'yo'}, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user