Skip to content
Browse files

Introduce a new version type, 'prerelease'. Quotes the version number

it's a pre-release of, and the revision number so you can tell two
pre-releases apart. I intend to use this for builds from branch-0.61
until I call it 0.62 proper.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9343 cda61777-01e9-0310-a592-d414129be87e
  • Loading branch information...
1 parent cd1a94a commit 479fb46358969757f85b387630ae54b6fa8d8a36 simon committed Nov 26, 2011
Showing with 22 additions and 6 deletions.
  1. +7 −5 Buildscr
  2. +10 −1 mkunxarc.sh
  3. +5 −0 version.c
View
12 Buildscr
@@ -7,6 +7,7 @@ module putty
set Makever -DSVN_REV=$(revision)
ifneq "$(!numeric $(revision))" "yes" set Makever $(Makever) -DMODIFIED
ifneq "$(RELEASE)" "" set Makever $(Makever) -DRELEASE=$(RELEASE)
+ifneq "$(PRERELEASE)" "" set Makever $(Makever) -DPRERELEASE=$(PRERELEASE)
ifneq "$(date)" "" set Makever $(Makever) -DSNAPSHOT=$(date)
set Makeargs VER="$(Makever)"
ifneq "$(XFLAGS)" "" set Makeargs $(Makeargs) XFLAGS="$(XFLAGS)"
@@ -15,11 +16,13 @@ ifneq "$(MAKEARGS)" "" set Makeargs $(Makeargs) $(MAKEARGS)
# Set up the version string for the docs build.
set Docmakeargs VERSION="PuTTY revision $(revision)"
ifneq "$(RELEASE)" "" set Docmakeargs VERSION="PuTTY release $(RELEASE)"
+ifneq "$(PRERELEASE)" "" set Docmakeargs VERSION="PuTTY pre-release $(PRERELEASE):r$(revision)"
ifneq "$(date)" "" set Docmakeargs VERSION="PuTTY development snapshot $(date)"
# Set up the version string for the Unix source archive.
set Unxver r$(revision)
ifneq "$(RELEASE)" "" set Unxver $(RELEASE)
+ifneq "$(PRERELEASE)" "" set Unxver $(PRERELEASE)pre $(revision)
ifneq "$(date)" "" set Unxver $(date)
# Set up the various version strings for the installer.
@@ -33,16 +36,15 @@ ifneq "$(RELEASE)" "" set Iname PuTTY version $(RELEASE)
ifneq "$(RELEASE)" "" set Ivertext Release $(RELEASE)
ifneq "$(RELEASE)" "" set Irev 0
ifneq "$(RELEASE)" "" set Ifilename putty-$(RELEASE)-installer.exe
+ifneq "$(PRERELEASE)" "" set Iversion $(PRERELEASE):r$(revision)
+ifneq "$(PRERELEASE)" "" set Iname PuTTY pre-release $(PRERELEASE):r$(revision)
+ifneq "$(PRERELEASE)" "" set Ivertext Pre-release $(PRERELEASE):r$(revision)
+ifneq "$(PRERELEASE)" "" set Ifilename putty-$(PRERELEASE)-pre$(revision)-installer.exe
ifneq "$(date)" "" set Iversion $(date):r$(revision)
ifneq "$(date)" "" set Iname PuTTY development snapshot $(date):r$(revision)
ifneq "$(date)" "" set Ivertext Development snapshot $(date):r$(revision)
ifneq "$(date)" "" set Ifilename putty-$(date)-installer.exe
-# Set up the version string for the installer.
-set Iversion r$(revision)
-ifneq "$(RELEASE)" "" set Iversion $(RELEASE)
-ifneq "$(date)" "" set Iversion $(date):r$(revision)
-
in putty do ./mksrcarc.sh
in putty do ./mkunxarc.sh $(Unxver)
in putty do perl mkfiles.pl
View
11 mkunxarc.sh
@@ -27,8 +27,17 @@ case "$1" in
ver=
docver=
;;
+ *pre)
+ set -- "${1%pre}" "$2"
+ case "$1" in *[!.0-9a-z~]*) echo "Malformed prerelease ID '$1'">&2;exit 1;;esac
+ case "$2" in *[!.0-9a-z~]*) echo "Malformed prerelease revision '$1'">&2;exit 1;;esac
+ autoconfver="$1~pre$2"
+ arcsuffix="-$autoconfver"
+ ver="-DPRERELEASE=$1 -DSVN_REV=$2"
+ docver="VERSION=\"PuTTY prerelease $1:r$2\""
+ ;;
*)
- case "$1" in *[!.0-9a-z]*) echo "Malformed release ID '$1'">&2;exit 1;;esac
+ case "$1" in *[!.0-9a-z~]*) echo "Malformed release ID '$1'">&2;exit 1;;esac
autoconfver="$1"
arcsuffix="-$autoconfver"
ver="-DRELEASE=$1"
View
5 version.c
@@ -39,6 +39,11 @@ char sshver[] = "PuTTY-Snapshot-" SNAPSHOT_TEXT;
char ver[] = "Release " STR(RELEASE);
char sshver[] = "PuTTY-Release-" STR(RELEASE);
+#elif defined PRERELEASE
+
+char ver[] = "Pre-release " STR(PRERELEASE) ":r" STR(SVN_REV);
+char sshver[] = "PuTTY-Prerelease-" STR(PRERELEASE) ":r" STR(SVN_REV);
+
#elif defined SVN_REV
char ver[] = "Custom build r" STR(SVN_REV) ", " __DATE__ " " __TIME__;

0 comments on commit 479fb46

Please sign in to comment.
Something went wrong with that request. Please try again.