git "tag name > branch name > commit revision" 으로 구해오기
# 리눅스
> git describe --tags --exact-match 2> /dev/null || git symbolic-ref -q --short HEAD || git rev-parse --short HEAD
# 윈도우
> git describe --tags --exact-match 2> nul || git symbolic-ref -q --short HEAD || git rev-parse --short HEAD
# 윈도우 - batch script
FOR /F "tokens=* USEBACKQ" %%F IN (`git describe --tags --exact-match 2^> nul ^|^| git symbolic-ref -q --short HEAD ^|^| git rev-parse --short HEAD`) DO (
SET BUILD_VERSION=%%F
)
'가지가지' 카테고리의 다른 글
docker, docker-compose 설치 on ubuntu (0) | 2021.03.12 |
---|---|
logstash grok sample (0) | 2020.03.10 |
tcpdump (0) | 2020.03.03 |
로그 시간별로 쪼개기 (0) | 2020.02.06 |
ulimit 설정 (0) | 2019.10.31 |
Nginx 1.16.1 수동 컴파일 설치 on ubuntu 18.04 (0) | 2019.10.28 |
[GO] 1.13.1 go module (0) | 2019.10.25 |
crontab (0) | 2019.10.15 |