From 8c694a024ea449048acb6325e896d9785498efaa Mon Sep 17 00:00:00 2001 From: Jeremy Maitin-Shepard Date: Wed, 16 Apr 2008 23:02:48 -0400 Subject: [PATCH] Revamped versioning system, eliminated jarfile usage --- VERSION | 19 ------------------- application.ini | 6 +++--- build.sh | 40 +++++++++++++++------------------------- chrome.manifest.for-jar | 5 ----- 4 files changed, 18 insertions(+), 52 deletions(-) delete mode 100644 VERSION delete mode 100644 chrome.manifest.for-jar diff --git a/VERSION b/VERSION deleted file mode 100644 index 5b4a7c1..0000000 --- a/VERSION +++ /dev/null @@ -1,19 +0,0 @@ -## This file is the only place where you have to set Conkeror's version. The -## version is given here in the form of a specifier of three terms: -## MAJOR.MINOR.MILESTONE. The build system will process this value to reflect -## the build target. For release builds, the last term will be automatically -## dropped. For non-release builds, a fourth term (build date) will be -## appended. -## - -## To prepare a release, the maintainer should increment the minor version -## (second component), and set the milestone version (third component) to 0. -## - -## The milestone (third component) should be incremented for any nontrivial -## change to the project source in the public repository since the last -## release. The milestone gives developers an unambiguous way to indicate the -## relevant version of a patch or bug report. -## - -VERSION=0.42.40 diff --git a/application.ini b/application.ini index 28ccb00..609b87d 100644 --- a/application.ini +++ b/application.ini @@ -2,11 +2,11 @@ Vendor=conkeror.mozdev.org Name=conkeror ID={a79fe89b-6662-4ff4-8e88-09950ad4dfde} -Version=$CONKEROR_VERSION$ -BuildID=$CONKEROR_BUILD_DATE$ +Version=0.9 +BuildID=git [Gecko] -MinVersion=1.8 +MinVersion=1.8.9999 MaxVersion=1.9.* [XRE] diff --git a/build.sh b/build.sh index b0d6718..5b4e6d0 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,5 @@ #! /bin/bash -source VERSION - SDK_DIR="/usr/lib/xulrunner" XPIDL="${SDK_DIR}/xpidl" @@ -17,8 +15,6 @@ TARGET='help' ETAGSDIR="" case "$1" in - jar) - TARGET=jar ;; xulapp) TARGET=xulapp ;; dist-tar) @@ -42,8 +38,7 @@ esac shift -#build the spawn-process-helper -make +VERSION=$(grep '^Version=' application.ini | cut -d '=' -f 2) ## if this is not an official release, tag on a build date. @@ -169,44 +164,40 @@ function diff_wrapper () { ### ### -function do_target_jar () { - echo -n Building JAR... - FILES=($(find content branding locale modules -type f -and \! -name '*[~#]' -print )) - zip "conkeror.jar" "${FILES[@]}" > /dev/null - echo ok -} - - function do_target_xulapp () { - do_target_jar echo -n Building XULRunner Application... + + #build the spawn-process-helper + make + get_scratch mkdir -p "$SCRATCH/chrome" cp application.ini "$SCRATCH" if [ -n "$CONKEROR_APP_NAME" ]; then sed -i -e "s/Name=conkeror/Name=${CONKEROR_APP_NAME}/" "${SCRATCH}/application.ini" fi - mv conkeror.jar "$SCRATCH/chrome/" - cp chrome.manifest.for-jar "$SCRATCH/chrome/chrome.manifest" - copy_tree_sans_boring defaults "$SCRATCH/defaults" - copy_tree_sans_boring components "$SCRATCH/components" + for x in branding chrome components content defaults locale modules search-engines; do + copy_tree_sans_boring "$x" "$SCRATCH/$x" + done + cp spawn-process-helper "${SCRATCH}" if [ -d idl ]; then for x in idl/*; do name="$(basename "$x")" "${XPIDL}" -w -v -m typelib -I "${XPIDL_INCLUDE}" -e "$SCRATCH/components/${name%.idl}.xpt" "$x" done fi + BUILD_ID=$(git rev-parse HEAD 2> /dev/null) + if [ "$?" != 0 ]; then + BUILD_ID="git" + fi pushd "$SCRATCH" > /dev/null ## begin preprocessing ## - perl -pi -e 's/\$CONKEROR_VERSION\$/'$VERSION'/g' application.ini - perl -pi -e 's/\$CONKEROR_BUILD_DATE\$/'$BUILD_DATE'/g' application.ini - perl -pi -e 's/\$CONKEROR_VERSION\$/'$VERSION'/g' components/application.js + perl -pi -e 's/BuildID=git/BuildID='${BUILD_ID}'/g' application.ini ## ## end preprocessing - zip -r conkeror.xulapp * > /dev/null + zip -r ../conkeror.xulapp * > /dev/null popd > /dev/null - mv "$SCRATCH/conkeror.xulapp" . do_cleanup echo ok } @@ -335,7 +326,6 @@ function do_target_help () { assert_conkeror_src case "$TARGET" in - jar) do_target_jar ;; xulapp) do_target_xulapp ;; dist-tar) do_target_dist_tar ;; release) do_target_release ;; diff --git a/chrome.manifest.for-jar b/chrome.manifest.for-jar deleted file mode 100644 index 5866e86..0000000 --- a/chrome.manifest.for-jar +++ /dev/null @@ -1,5 +0,0 @@ -content conkeror jar:conkeror.jar!/content/ -content conkeror-modules jar:conkeror.jar!/modules/ -locale conkeror en-US jar:conkeror.jar!/locale/en-US/ -locale branding en-US jar:conkeror.jar!/branding/ -override chrome://global/locale/netErrorApp.dtd chrome://conkeror/locale/netError.dtd -- 2.11.4.GIT