commit 60bcead14a1ac9f53dabfd1edf72a1377edfb822 Author: Erinn Clark erinn@torproject.org Date: Tue Aug 30 00:22:34 2011 +0100
improve version string that goes into prefs.js by adding the build number, platform, and, if available, architecture --- build-scripts/linux.mk | 8 +++++--- build-scripts/osx.mk | 6 ++++-- build-scripts/windows.mk | 8 +++++--- 3 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/build-scripts/linux.mk b/build-scripts/linux.mk index 904aed7..b32b258 100644 --- a/build-scripts/linux.mk +++ b/build-scripts/linux.mk @@ -36,6 +36,8 @@ include $(PWD)/versions.mk
## Architecture ARCH_TYPE=$(shell uname -m) +BUILD_NUM=1 +PLATFORM=Linux
## Location of directory for source unpacking FETCH_DIR=/srv/build-trees/build-alpha-$(ARCH_TYPE) @@ -166,7 +168,7 @@ NAME=tor-browser DISTDIR=tbbl-alpha-dist
## Version and name of the compressed bundle (also used for source) -VERSION=$(RELEASE_VER)-1-alpha +VERSION=$(RELEASE_VER)-$(BUILD_NUM)-alpha DEFAULT_COMPRESSED_BASENAME=tor-browser-gnu-linux-$(ARCH_TYPE)-$(VERSION)- IM_COMPRESSED_BASENAME=tor-im-browser-gnu-linux-$(VERSION)- DEFAULT_COMPRESSED_NAME=$(DEFAULT_COMPRESSED_BASENAME)$(VERSION) @@ -468,6 +470,6 @@ update-extension-pref: sed -i -e "s/SHPONKA/langpack-$(LANGCODE)@firefox.mozilla.org:$$ext_ver/g" $(BUNDLE)/Data/profile/prefs.js
write-tbb-version: - printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)" >> $(BUNDLE)/App/Firefox/defaults/profile/prefs.js - printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)" >> $(BUNDLE)/Data/profile/prefs.js + printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)-$(BUILD_NUM)-$(PLATFORM)-$(ARCH_TYPE)" >> $(BUNDLE)/App/Firefox/defaults/profile/prefs.js + printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)-$(BUILD_NUM)-$(PLATFORM)-$(ARCH_TYPE)" >> $(BUNDLE)/Data/profile/prefs.js
diff --git a/build-scripts/osx.mk b/build-scripts/osx.mk index 2e8b290..f1f62a6 100644 --- a/build-scripts/osx.mk +++ b/build-scripts/osx.mk @@ -36,6 +36,8 @@ include $(PWD)/versions.mk
## Architecture ARCH_TYPE=i386 +BUILD_NUM=1 +PLATFORM=MacOS
## Location of directory for source unpacking FETCH_DIR=$(PWD)/build-alpha-$(ARCH_TYPE) @@ -153,7 +155,7 @@ NAME=TorBrowser DISTDIR=tbbosx-alpha-dist
## Version and name of the compressed bundle (also used for source) -VERSION=$(RELEASE_VER)-1-alpha +VERSION=$(RELEASE_VER)-$(BUILD_NUM)-alpha DEFAULT_COMPRESSED_BASENAME=TorBrowser-$(VERSION)-osx-$(ARCH_TYPE)- IM_COMPRESSED_BASENAME=TorBrowser-IM-$(VERSION)- DEFAULT_COMPRESSED_NAME=$(DEFAULT_COMPRESSED_BASENAME) @@ -433,7 +435,7 @@ update-extension-pref: sed -i -e "s/SHPONKA/langpack-$(LANGCODE)@firefox.mozilla.org:$$ext_ver/g" $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/prefs.js
write-tbb-version: - printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)" >> $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/prefs.js + printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)-$(BUILD_NUM)-$(PLATFORM)-$(ARCH_TYPE)" >> $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/prefs.js
final: mv $(BUNDLE) $(BUNDLE).app diff --git a/build-scripts/windows.mk b/build-scripts/windows.mk index da1384e..be4d957 100644 --- a/build-scripts/windows.mk +++ b/build-scripts/windows.mk @@ -31,6 +31,8 @@
## Include versions include $(PWD)/versions.mk +BUILD_NUM=1 +PLATFORM=Windows
## Location of required libraries MING=/c/MinGW/bin @@ -138,7 +140,7 @@ NAME="Tor Browser" DISTDIR=tbbwin-alpha-dist
## Version and name of the compressed bundle (also used for source) -VERSION=$(RELEASE_VER)-1-alpha +VERSION=$(RELEASE_VER)-$(BUILD_NUM)-alpha DEFAULT_COMPRESSED_BASENAME=tor-browser-$(VERSION) IM_COMPRESSED_BASENAME=tor-im-browser-$(VERSION) DEFAULT_COMPRESSED_NAME=$(DEFAULT_COMPRESSED_BASENAME) @@ -441,8 +443,8 @@ apply-prefs: cp $(DEST)/FirefoxPortable/Data/profile/prefs.js $(CONFIG_SRC)
write-tbb-version: - printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)" >> $(BUNDLE)/FirefoxPortable/App/DefaultData/profile/prefs.js - printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)" >> $(BUNDLE)/FirefoxPortable/Data/profile/prefs.js + printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)-$(BUILD_NUM)-$(PLATFORM)-$(ARCH_TYPE)" >> $(BUNDLE)/FirefoxPortable/App/DefaultData/profile/prefs.js + printf 'user_pref("torbrowser.version", "%s");\n' "$(RELEASE_VER)-$(BUILD_NUM)-$(PLATFORM)-$(ARCH_TYPE)" >> $(BUNDLE)/FirefoxPortable/Data/profile/prefs.js
## Export the source code of the bundle SRCNAME=$(COMPRESSED_NAME)