mirror of
				https://github.com/docker/compose.git
				synced 2025-10-31 03:03:49 +01:00 
			
		
		
		
	Merge pull request #6363 from ulyssessouza/6157-build-from-source
Adopts 'unknown' as build revision in case git cannot retrieve it.
This commit is contained in:
		
						commit
						c32bc095f3
					
				| @ -2,6 +2,11 @@ | |||||||
| # | # | ||||||
| # Write the current commit sha to the file GITSHA. This file is included in | # Write the current commit sha to the file GITSHA. This file is included in | ||||||
| # packaging so that `docker-compose version` can include the git sha. | # packaging so that `docker-compose version` can include the git sha. | ||||||
| # | # sets to 'unknown' and echoes a message if the command is not successful | ||||||
| set -e | 
 | ||||||
| git rev-parse --short HEAD > compose/GITSHA | DOCKER_COMPOSE_GITSHA="$(git rev-parse --short HEAD)" | ||||||
|  | if [[ "${?}" != "0" ]]; then | ||||||
|  |     echo "Couldn't get revision of the git repository. Setting to 'unknown' instead" | ||||||
|  |     DOCKER_COMPOSE_GITSHA="unknown" | ||||||
|  | fi | ||||||
|  | echo "${DOCKER_COMPOSE_GITSHA}" > compose/GITSHA | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user