mirror of
				https://github.com/actions-rs/toolchain.git
				synced 2025-10-31 09:33:54 +00:00 
			
		
		
		
	Fix ts file identification in pre-commit hook
This commit is contained in:
		
							parent
							
								
									7f00d1018c
								
							
						
					
					
						commit
						b223206e28
					
				| @ -6,7 +6,7 @@ | ||||
| # This script can yield false positives in cases where you only make stylistic changes to the TypeScript code that don't result in changes to the compiled JavaScript code. | ||||
| # It is your responsibility as a developer to then commit the changes with `git commit --no-verify` and simply skip this commit hook. | ||||
| 
 | ||||
| TS_FILES=$(git diff --staged --name-only | grep -c '.ts') | ||||
| TS_FILES=$(git diff --staged --name-only | grep -c '\.ts$') | ||||
| DIST_MODIFIED=$(git diff --staged --name-only | grep -c dist/index.js) | ||||
| 
 | ||||
| if [ $TS_FILES -gt 0 ] && [ $DIST_MODIFIED -eq 0 ] ; then | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user