summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-03-20 08:57:44 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-03-20 08:57:44 -0400
commit62422f3a54d157fb3280ee51a62b7cfe5b759acb (patch)
treebab58b162d6e5417ec902ef3120e00e3542192b6 /tools
parentfb44bb28b8b3e7861b96c874dc79072f89fec10b (diff)
downloadscala-62422f3a54d157fb3280ee51a62b7cfe5b759acb.tar.gz
scala-62422f3a54d157fb3280ee51a62b7cfe5b759acb.tar.bz2
scala-62422f3a54d157fb3280ee51a62b7cfe5b759acb.zip
Yet another attempt to make the version a good one
This fixes the git commit drift issue and gives us enough granularity to make releases at any time that are cronologically increasing.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/get-scala-commit-date3
-rwxr-xr-xtools/get-scala-commit-drift17
-rw-r--r--tools/get-scala-commit-drift.bat21
3 files changed, 2 insertions, 39 deletions
diff --git a/tools/get-scala-commit-date b/tools/get-scala-commit-date
index ef5b0f540d..b2e4e10770 100755
--- a/tools/get-scala-commit-date
+++ b/tools/get-scala-commit-date
@@ -11,6 +11,7 @@
[[ $# -eq 0 ]] || cd "$1"
lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
# 20120324
-echo "${lastcommitdate//-/}"
+echo "${lastcommitdate//-/}-${lastcommithours//:/}"
diff --git a/tools/get-scala-commit-drift b/tools/get-scala-commit-drift
deleted file mode 100755
index 1395c92c3d..0000000000
--- a/tools/get-scala-commit-drift
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-#
-# Usage: get-scala-commit-drift [dir]
-# Figures out current commit drift of a git clone.
-# If no dir is given, current working dir is used.
-#
-# Example output string:
-# 123
-#
-# Build drift = # of commits since last tag.
-
-[[ $# -eq 0 ]] || cd "$1"
-
-# git describe is completely useles to us if we're on a tag, or haven't changed since then.
-# This at least gives us a total number of commits included in a release, which should grow steadily.
-counter=$(git shortlog | grep -E '^[ ]+\w+' | wc -l)
-printf "%08d" "$counter"
diff --git a/tools/get-scala-commit-drift.bat b/tools/get-scala-commit-drift.bat
deleted file mode 100644
index ac289d3481..0000000000
--- a/tools/get-scala-commit-drift.bat
+++ /dev/null
@@ -1,21 +0,0 @@
-@echo off
-rem
-rem Usage: get-scala-commit-drift.bat [dir]
-rem Figures out current scala commit drift, of a clone.
-rem
-rem If no dir is given, current working dir is used.
-
-@setlocal
-set _DIR=
-if "%*"=="" (
- for /f "delims=;" %%i in ('cd') do set "_DIR=%%i"
-) else (
- set "_DIR=%~1"
-)
-cd %_DIR%
-
-rem TODO - WRITE THIS
-echo "TODO"
-
-:end
-@endlocal