aboutsummaryrefslogblamecommitdiff
path: root/scripts/build/get-scala-commit-date
blob: ef5b0f540da7d1882841ceda102447b2aea260f8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                           
#!/usr/bin/env bash
#
# Usage: get-scala-commit-date [dir]
# Figures out current commit date of a git clone.
# If no dir is given, current working dir is used.
#
# Example build version string:
#   20120312
#

[[ $# -eq 0 ]] || cd "$1"

lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)

# 20120324
echo "${lastcommitdate//-/}"