test: setup private npm registry w/sinopia
This commit is contained in:
		
							parent
							
								
									019aeeabe1
								
							
						
					
					
						commit
						c936e8be4b
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,2 +1,3 @@ | |||||||
| node_modules | node_modules | ||||||
| *.log | *.log | ||||||
|  | .tmp | ||||||
|  | |||||||
							
								
								
									
										9
									
								
								bin/post-test
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								bin/post-test
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | 
 | ||||||
|  | cat .tmp/sinopia.pid | xargs kill | ||||||
|  | 
 | ||||||
|  | cat .tmp/registry | xargs npm config set registry | ||||||
|  | 
 | ||||||
|  | cp .tmp/.npmrc ~/.npmrc | ||||||
|  | 
 | ||||||
|  | rm -rf .tmp | ||||||
							
								
								
									
										15
									
								
								bin/pre-test
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								bin/pre-test
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,15 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | 
 | ||||||
|  | mkdir -p .tmp/modules | ||||||
|  | 
 | ||||||
|  | ./node_modules/.bin/sinopia ./tests/config.yml & echo $! >> .tmp/sinopia.pid | ||||||
|  | 
 | ||||||
|  | sleep 0.5 | ||||||
|  | 
 | ||||||
|  | npm config get registry >> .tmp/registry | ||||||
|  | 
 | ||||||
|  | cp ~/.npmrc .tmp/.npmrc | ||||||
|  | 
 | ||||||
|  | cp tests/.npmrc ~/.npmrc | ||||||
|  | 
 | ||||||
|  | npm config set registry http://localhost:4873/ | ||||||
| @ -19,7 +19,8 @@ | |||||||
|     "semver": "^4.2.0" |     "semver": "^4.2.0" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "standard": "^2.3.1" |     "standard": "^2.3.1", | ||||||
|  |     "sinopia": "^1.0.0" | ||||||
|   }, |   }, | ||||||
|   "homepage": "https://github.com/boennemann/semantic-release", |   "homepage": "https://github.com/boennemann/semantic-release", | ||||||
|   "keywords": [ |   "keywords": [ | ||||||
| @ -38,8 +39,10 @@ | |||||||
|     "url": "https://github.com/boennemann/semantic-release.git" |     "url": "https://github.com/boennemann/semantic-release.git" | ||||||
|   }, |   }, | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "prepublish": "./bin/semantic-release pre", |  | ||||||
|     "postpublish": "./bin/semantic-release post", |     "postpublish": "./bin/semantic-release post", | ||||||
|  |     "posttest": "./bin/post-test", | ||||||
|  |     "prepublish": "./bin/semantic-release pre", | ||||||
|  |     "pretest": "./bin/pre-test", | ||||||
|     "test": "standard" |     "test": "standard" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								tests/.htpasswd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/.htpasswd
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | test:{SHA}C+7Hteo/D9vJXQ3UfzxbwnXaijM= | ||||||
							
								
								
									
										2
									
								
								tests/.npmrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/.npmrc
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | |||||||
|  | _auth=dGVzdDpmb28= | ||||||
|  | email=test@example.com | ||||||
							
								
								
									
										17
									
								
								tests/config.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								tests/config.yml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | storage: ../.tmp/.storage | ||||||
|  | 
 | ||||||
|  | auth: | ||||||
|  |   htpasswd: | ||||||
|  |     file: ./.htpasswd | ||||||
|  | 
 | ||||||
|  | uplinks: | ||||||
|  |   npmjs: | ||||||
|  |     url: https://registry.npmjs.org/ | ||||||
|  | 
 | ||||||
|  | logs: | ||||||
|  |   - {type: stdout, format: pretty, level: silent} | ||||||
|  | 
 | ||||||
|  | packages: | ||||||
|  |   '*': | ||||||
|  |     allow_access: all | ||||||
|  |     allow_publish: all | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user