diff --git a/VERSION b/VERSION new file mode 100644 index 0000000000000..d1b2a27ab74d8 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0 (pre-release) diff --git a/j/.gitignore b/j/.gitignore index 2f66d75c364da..b972ecad94c43 100644 --- a/j/.gitignore +++ b/j/.gitignore @@ -1,2 +1,2 @@ /pcre_h.j -/sys.ji +/version.j diff --git a/j/Makefile b/j/Makefile index 4f10d4b1dc80e..a8c4a2ee5ff24 100644 --- a/j/Makefile +++ b/j/Makefile @@ -2,8 +2,10 @@ JULIAHOME = $(shell pwd)/.. include ../Make.inc PCRE_CONST = 0x[0-9a-fA-F]+|[-+]?\s*[0-9]+ -COMMITVER=$(shell git log -1 | head -n1 | cut -b8-47) -COMMITDATE=$(shell git log -1 | head -n3 | tail -n1 | cut -b 9-50) + +JULIA_VERSION=$(shell cat ../VERSION) +COMMIT_HASH=$(shell git log -1 --pretty=format:%H) +COMMIT_DATE=$(shell git log -1 --pretty=format:%ct | xargs perl -MPOSIX=strftime -le 'print strftime "%F %T", gmtime $$ARGV[0]') all: pcre_h.j version.j @@ -11,7 +13,7 @@ pcre_h.j: cpp -dM $(EXTROOT)/include/pcre.h | perl -nle '/^\s*#define\s+(PCRE\w*)\s*\(?($(PCRE_CONST))\)?\s*$$/ and print "$$1 = $$2"' | sort > $@ version.j: - echo "version() = (0.5, \"$(COMMITVER)\", \"$(COMMITDATE)\")" > version.j + echo "VERSION = (\"$(JULIA_VERSION)\", \"$(COMMIT_HASH)\", \"$(COMMIT_DATE)\")" > version.j clean: rm -f pcre_h.j version.j diff --git a/j/client.j b/j/client.j index 18e7206c4ec0f..5a9a9a6b0124d 100644 --- a/j/client.j +++ b/j/client.j @@ -97,9 +97,8 @@ function color_available() false end -jl_version_string = strcat("Version ", version()[1], " (pre-release)") -jl_commit_string = strcat("Commit ", version()[2]) -jl_commit_date = version()[3] +jl_version_string = "Version $(VERSION[1])" +jl_commit_string = "Commit $(VERSION[2][1:10]) ($(VERSION[3]))" jl_banner_plain = L" _ @@ -108,7 +107,7 @@ L" _ _ _ _| |_ __ _ | $jl_version_string | | | | | | |/ _` | | | | |_| | | | (_| | | $jl_commit_string - _/ |\__'_|_|_|\__'_| | $jl_commit_date + _/ |\__'_|_|_|\__'_| | |__/ | " @@ -127,7 +126,7 @@ jl_banner_color = $(jl)_ _ _| |_ __ _$(tx) | $jl_version_string $(jl)| | | | | | |/ _` |$(tx) | $(jl)| | |_| | | | (_| |$(tx) | $jl_commit_string - $(jl)_/ |\\__'_|_|_|\\__'_|$(tx) | $jl_commit_date + $(jl)_/ |\\__'_|_|_|\\__'_|$(tx) | $(jl)|__/$(tx) | \033[0m"