Commit cbeb6c34 authored by Lena Hersemann's avatar Lena Hersemann

added saving of ngs_tools' git commit version

parent 46bcfbed
......@@ -68,54 +68,6 @@ How to report used version for a project?
-----------------------------------------
```bash
(cd ${NGS_TOOLS} && git diff --exit-code && git rev-parse HEAD) > ${PRJ_DATA}/.used_ngs_tools
```
How to tag it for a project (Deprecated)
----------------------------------------
```bash
# ensure there are no pending changes
# http://stackoverflow.com/questions/5139290/how-to-check-if-theres-nothing-to-be-committed-in-the-current-branch
git diff --exit-code
# create the tag for current branch
(cd ${NGS_TOOLS} && test -n "$project" && git diff --exit-code && git tag "${project}__$(date +'%Y%m%d')") || echo "could not tag current branch"
# and log it
git describe --tags >> ${baseDir}/.used_ngs_tools
(cd ${NGS_TOOLS} && test -n "${PRJ_NAME}" && git diff --exit-code && git rev-parse HEAD >> ${PRJ_DATA}/.used_ngs_tools ) || echo "pending changes in ngs_tools"
## since tags are not pushed by default we need to trigger the push
git push --tags
```
How to create a new version tag
-------------------------------
1. Create branch:
```
cd /Volumes/projects/bioinfo/scripts/ngs_tools/dev
git checkout -b v3.23
git push
```
1. Checkout new branch into ngs_tools as stable version
```
cd /Volumes/projects/bioinfo/scripts/ngs_tools/
newVersion=v1.1
mkdir $newVersion
cd $newVersion
git clone git-srv1:/local/git/bioinformatics .
git checkout ${newVersion}
## prevent from writing
chmod -R -w ../$newVersion
```
 
\ No newline at end of file
......@@ -149,10 +149,7 @@ rend.R -e ${NGS_TOOLS}/common/cp_enrichment.R --overlay_expr_data ../plot_score_
## version common tools
## todo make sure to stay in current directory #{ (cd ${NGS_TOOLS} && git describe --tags) } >> .used_ngs_tools
(cd ${NGS_TOOLS} && test -n "${PRJ_NAME}" && git diff --exit-code && git tag "${PRJ_NAME}__$(date +'%Y%m%d')") || echo "could not tag current branch"
# and log it
git describe --tags >> ${PRJ_DATA}/.used_ngs_tools
(cd ${NGS_TOOLS} && test -n "${PRJ_NAME}" && git diff --exit-code && git rev-parse HEAD >> ${PRJ_DATA}/.used_ngs_tools ) || echo "pending changes in ngs_tools"
########################################################################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment