Skip to content

Commit

Permalink
Use two-digit year and month as minor version and build number.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Dec 1, 2018
1 parent 62e0808 commit f08bff4
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion metapath/res/metapath.exe.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity name="metapath" processorArchitecture="*" version="4.0.13.1435" type="win32"/>
<assemblyIdentity name="metapath" processorArchitecture="*" version="4.18.12.1629" type="win32"/>
<description>metapath</description>
<dependency>
<dependentAssembly>
Expand Down
8 changes: 5 additions & 3 deletions metapath/src/VersionRev.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define VERSION_HASH _T("0ee3099")
#define VERSION_REV 1435
#define VERSION_REV_FULL _T("r1435 (0ee3099)")
#define VERSION_MINOR 18
#define VERSION_BUILD 12
#define VERSION_HASH _T("62e0808")
#define VERSION_REV 1629
#define VERSION_REV_FULL _T("r1629 (62e0808)")
2 changes: 0 additions & 2 deletions metapath/src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#define STRINGIFY(x) DO_STRINGIFY(x)

#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_BUILD 13

#define MY_APPNAME L"metapath"
#define VERSION_FILEVERSION_NUM VERSION_MAJOR,VERSION_MINOR,VERSION_BUILD,VERSION_REV
Expand Down
2 changes: 1 addition & 1 deletion res/Notepad2.exe.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity name="Notepad2" processorArchitecture="*" version="4.2.25.1435" type="win32"/>
<assemblyIdentity name="Notepad2" processorArchitecture="*" version="4.18.12.1629" type="win32"/>
<description>Notepad2</description>
<dependency>
<dependentAssembly>
Expand Down
2 changes: 0 additions & 2 deletions src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#define STRINGIFY(x) DO_STRINGIFY(x)

#define VERSION_MAJOR 4
#define VERSION_MINOR 2
#define VERSION_BUILD 25

#define MY_APPNAME L"Notepad2"
#define VERSION_FILEVERSION_NUM VERSION_MAJOR,VERSION_MINOR,VERSION_BUILD,VERSION_REV
Expand Down
8 changes: 5 additions & 3 deletions src/VersionRev.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define VERSION_HASH _T("0ee3099")
#define VERSION_REV 1435
#define VERSION_REV_FULL _T("r1435 (0ee3099)")
#define VERSION_MINOR 18
#define VERSION_BUILD 12
#define VERSION_HASH _T("62e0808")
#define VERSION_REV 1629
#define VERSION_REV_FULL _T("r1629 (62e0808)")
11 changes: 7 additions & 4 deletions version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ fi

ver_full="_T(\"r$ver ($hash)$ver_full\")"

version_info+="#define VERSION_MINOR `date +%y`"$'\n'
version_info+="#define VERSION_BUILD `date +%m`"$'\n'
version_info+="#define VERSION_HASH _T(\"$hash\")"$'\n'
version_info+="#define VERSION_REV $ver"$'\n'
version_info+="#define VERSION_REV_FULL $ver_full"
Expand All @@ -84,8 +86,9 @@ if [[ ! -f "$versionfile" ]] || [[ "$version_info" != "$(<"$versionfile")" ]]; t
fi

# Update manifest file if version information was changed.
base_ver="4.2.25"
newmanifest="$(sed -Ee "s/(${base_ver}.)([0-9]+)/\1${ver}/g" "$manifestfile")"
base_ver="4"
new_ver="`date +%y.%m`.${ver}"
newmanifest="$(sed -Ee "s/(${base_ver}\.)([0-9.]+)/\1${new_ver}/g" "$manifestfile")"
if [[ "$newmanifest" != "$(<"$manifestfile")" ]]; then
# Update the revision number in the manifest file
echo "$newmanifest" > "$manifestfile"
Expand All @@ -99,8 +102,8 @@ if [[ $# -ne 0 ]]; then
echo "$version_info" > "$versionfile"
fi

base_ver="4.0.13"
newmanifest="$(sed -Ee "s/(${base_ver}.)([0-9]+)/\1${ver}/g" "$manifestfile")"
base_ver="4"
newmanifest="$(sed -Ee "s/(${base_ver}\.)([0-9.]+)/\1${new_ver}/g" "$manifestfile")"
if [[ "$newmanifest" != "$(<"$manifestfile")" ]]; then
echo "$newmanifest" > "$manifestfile"
fi
Expand Down

0 comments on commit f08bff4

Please sign in to comment.