record-git-commit.sh 341 B

12345678910
  1. #!/bin/bash
  2. #
  3. # save the current git commit to results/.commit
  4. #
  5. echo "Saving current git commit to results directory..."
  6. GIT_COMMIT=$(git -C $TFB_REPOPARENT/$TFB_REPONAME rev-parse HEAD)
  7. mkdir -p $TFB_REPOPARENT/$TFB_REPONAME/results
  8. echo $GIT_COMMIT > $TFB_REPOPARENT/$TFB_REPONAME/results/commit_id.txt
  9. echo "Using commit: " $GIT_COMMIT