| @@ -1,7 +1,6 @@ | ||||
| # Gets git data. | ||||
| # Should be sourced where neccessary. | ||||
|  | ||||
| export BRANCHNAME=${BRANCHNAME:=$(git branch --no-color --show-current)} | ||||
| export BUILDID=${BUILDID:=$(git rev-list HEAD --count)} | ||||
| export COMMITHASH=${COMMITHASH:=$(git rev-parse --verify HEAD)} | ||||
| export VERSION=${VERSION:="0.1.0-dev"} | ||||
| export VERSION=${VERSION:=$(cat VERSION)} | ||||
|   | ||||
							
								
								
									
										6
									
								
								scripts/shell_helpers/get_release_data.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								scripts/shell_helpers/get_release_data.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| # Overrides some variables for release. | ||||
|  | ||||
| export VERSION=$(cat VERSION) | ||||
| export BRANCHNAME="release/${VERSION}" | ||||
| export COMMITHASH="none" | ||||
| export BUILDID="0" | ||||
| @@ -1,7 +1,11 @@ | ||||
| #!/usr/bin/env bash | ||||
|  | ||||
| # Showing git data in console. | ||||
| source ./scripts/shell_helpers/get_git_data.sh | ||||
| if [ -d .git ]; then | ||||
|     source ./scripts/shell_helpers/get_git_data.sh | ||||
| else | ||||
|     source ./scripts/shell_helpers/get_release_data.sh | ||||
| fi | ||||
|  | ||||
| echo "* Branch: ${BRANCHNAME}" | ||||
| echo "* Build ID: ${BUILDID}" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user