From 5e0d704b127c9a927c03a1944213fadaff6f0567 Mon Sep 17 00:00:00 2001 From: Artur Adib Date: Thu, 17 Nov 2011 15:45:33 -0500 Subject: [PATCH] Macro for generating version information --- Makefile | 1 + src/pdf.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3e385b175..2cc886091 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,7 @@ bundle: | $(BUILD_DIR) @cd src; \ cat $(PDF_JS_FILES) > all_files.tmp; \ sed '/PDFJSSCRIPT_INCLUDE_ALL/ r all_files.tmp' pdf.js > ../$(BUILD_TARGET); \ + sed -i '' "s/PDFJSSCRIPT_BUNDLE_VER/`git log --format="%H" -n 1`/" ../$(BUILD_TARGET); \ rm -f *.tmp; \ cd .. diff --git a/src/pdf.js b/src/pdf.js index 51f606548..1a551d300 100644 --- a/src/pdf.js +++ b/src/pdf.js @@ -7,8 +7,9 @@ var PDFJS = {}; // Use strict in our context only - users might not want it 'use strict'; + PDFJS.build = "PDFJSSCRIPT_BUNDLE_VER"; + // Files are inserted below - see Makefile /* PDFJSSCRIPT_INCLUDE_ALL */ }).call((typeof window === 'undefined') ? this : window); -