기본 콘텐츠로 건너뛰기

git commit 버젼 정보를 이용한 배포 버전 관리

cvs를 사용하다가 svn을 사용하니깐 편해졌다고 느끼고 있었는데

git을 사용하니깐 차원이 다른 편함이네요.  자유로워진 느낌이랄까. 

회사를 옮기면서 버젼 관리 고민하다가 컴파일되어서 배포되는 파일들이 많아서

git commit hash 값으로 하면 관리하기 편할것 같아서 찾아보니 좋은 정보가 있어서

공유합니다. powershell로 되어있는데 python으로 

약간 수정해서 사용하고 있습니다. 

일단 버젼에 대한 고민이 없어진것 같아서 좋은것 같네요...

다른 분들은 어떻게 관리들 하시는지 궁금하네요??? ㅋㅋ

python코드 공유합니다. 




  • hash/email/날짜
git log -n 1 --format="%h - %H%n%ae%n%ai"

c197222 - c197222f052002126ede8ec71b4fb1e655c29722
eek@메일주소
2014-02-05 19:25:00 +0900


  • 변경확인
컴파일전에 commit안된 것들 있는지 확인

git ls-files --exclude-standard -d -m -k | wc -l 


  • 생성된 버젼 sample
version.h파일 생성



  • version생성 스크립트 make_version.py
요약

  1. commit hash/email/date 추출
  2. 파일들 commit 되어 컴파일되어있는지 확인
  3. version.h파일 생성 
  4. 컴파일 후 배포 
  5. 끝.

댓글

이 블로그의 인기 게시물

oradiag_??? 로그 생성안되게 하는 방법

cx_Oracle이나 oci로 개발된 프로그램을 사용하다 보면 $HOME에 orgdiag_사용자계정으로 로그가 대량으로 저장되는 경우가 발생합니다. 이런 경우에 로그가 남지 않도록 하던지 아님 다른 경로에 저장하는 방법은  아래와 같은 방법으로 처리할 수 있습니다. 로그 안남기는 방법은. 환경변수에 추가 export TNS_ADMIN=/home/eek/conf/ 해당경로에 sqlnet.ora파일 생성해서 DIAG_ADR_ENABLED=off TRACE_LEVEL_CLIENT=off LOG_FILE_CLIENT=/dev/null 설정값을 추가하면 로그 파일이 생성되지 않음. 자세한 설정 정보는 http://docs.oracle.com/cd/B28359_01/network.111/b28317/sqlnet.htm#BIIDEAFI 참고하세요. 끝.

Visual Leak Detector - Enhanced Memory Leak Detection for Visual C++

Download Visual Leak Detector - 515.7 Kb Download demo console project - 518 Kb Download demo MFC project - 525.2 Kb Download the source code - 29 Kb What's New 30 March 2005 - Version 0.9d has been newly released. This is a fairly major release that features significant changes to the way VLD interfaces with the application being debugged. With this release, VLD is now packaged in library form. Packaged as a pre-built library, it is now much easier to start using VLD with your projects because it no longer requires you to set-up your build environment in any particular way. For example, you'll no longer need to have the Platform SDK installed in order to use VLD. You also won't need to configure Visual C++'s include search path to include directories in any specific order. Introduction This memory leak detector is superior, in a number of ways, to the memory leak detection provided natively by MFC or the Microsoft C runtime library. First, built-in lea...

Oracle Instant Client + sqlldr install

Instant Client Downloads + SQL*Loader 설치 http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html 아래와 같이 버젼에 따라서 3가지를 다운로드 합니다. basic, sdk, sqlplus instantclient-basic-linux.x64-11.2.0.3.0.zip instantclient-sdk-linux.x64-11.2.0.3.0.zip instantclient-sqlplus-linux.x64-11.2.0.3.0.zip 설치되어있는 oracle 에서 rdms , nls , sqlldr 를 복사합니다. cp -r /home/oracle/product/10/rdbms ~eek/usr/instantclient_10_2/ cp -r /home/oracle/product/10/nls ~eek/usr/instantclient_10_2/ # 파일 복사 cp -r /home/oracle/product/10/bin/sqlldr ~eek/usr/instantclient_10_2/ # 권한설정 chown -R eek.eek ~eek/usr/instantclient_10_2/ # 환경변수 등록 export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601 export ORACLE_HOME=/home/eek/usr/instantclient_10_2 export ORA_NLS10=$ORACLE_HOME/nls/data