Updated usage of until
This commit is contained in:
		
							parent
							
								
									b45fdcf650
								
							
						
					
					
						commit
						a558487ee0
					
				
							
								
								
									
										10
									
								
								diff-sha.sh
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								diff-sha.sh
									
									
									
									
									
								
							| @ -40,8 +40,7 @@ fi | |||||||
| 
 | 
 | ||||||
| echo "::debug::Getting HEAD SHA..." | echo "::debug::Getting HEAD SHA..." | ||||||
| 
 | 
 | ||||||
| if [[ -z $INPUT_SHA ]]; then | if [[ -n "$INPUT_UNTIL" ]]; then | ||||||
|   if [[ -n "$INPUT_UNTIL" ]]; then |  | ||||||
|   echo "::debug::Getting HEAD SHA for '$INPUT_UNTIL'..." |   echo "::debug::Getting HEAD SHA for '$INPUT_UNTIL'..." | ||||||
|   CURRENT_SHA=$(git log -1 --format="%H" --date=local --until="$INPUT_UNTIL") && exit_status=$? || exit_status=$? |   CURRENT_SHA=$(git log -1 --format="%H" --date=local --until="$INPUT_UNTIL") && exit_status=$? || exit_status=$? | ||||||
| 
 | 
 | ||||||
| @ -49,11 +48,12 @@ if [[ -z $INPUT_SHA ]]; then | |||||||
|     echo "::error::Invalid until date: $INPUT_UNTIL" |     echo "::error::Invalid until date: $INPUT_UNTIL" | ||||||
|     exit 1 |     exit 1 | ||||||
|   fi |   fi | ||||||
|   else |  | ||||||
|     CURRENT_SHA=$(git rev-list -n 1 "HEAD" 2>&1) && exit_status=$? || exit_status=$? |  | ||||||
|   fi |  | ||||||
| else | else | ||||||
|  |   if [[ -z $INPUT_SHA ]]; then | ||||||
|  |     CURRENT_SHA=$(git rev-list -n 1 "HEAD" 2>&1) && exit_status=$? || exit_status=$? | ||||||
|  |   else | ||||||
|     CURRENT_SHA=$INPUT_SHA; exit_status=$? |     CURRENT_SHA=$INPUT_SHA; exit_status=$? | ||||||
|  |   fi | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| echo "::debug::Verifying the current commit SHA: $CURRENT_SHA" | echo "::debug::Verifying the current commit SHA: $CURRENT_SHA" | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tonye Jack
						Tonye Jack