mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[internal] added script to change version and set version to 1.0.1
* also minor improvements to internal scripts
This commit is contained in:
parent
3e3126667e
commit
b23a8089fd
4 changed files with 53 additions and 9 deletions
45
_chver.sh
Normal file
45
_chver.sh
Normal file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
# Changes the version number
|
||||
# !!!THIS SCRIPT IS FOR INTERNAL DEVELOPER USE ONLY!!!
|
||||
|
||||
type -P sed &>/dev/null || { echo "sed command not found. Aborting." >&2; exit 1; }
|
||||
|
||||
if [ ! -n "$1" ]; then
|
||||
echo "you must provide a version number (eg. 1.0.2)"
|
||||
exit 1
|
||||
else
|
||||
MAJOR=`echo $1 | sed "s/\(.*\)[.].*[.].*/\1/"`
|
||||
MINOR=`echo $1 | sed "s/.*[.]\(.*\)[.].*/\1/"`
|
||||
MICRO=`echo $1 | sed "s/.*[.].*[.]\(.*\)/\1/"`
|
||||
fi
|
||||
case $MAJOR in *[!0-9]*)
|
||||
echo "$MAJOR is not a number"
|
||||
exit 1
|
||||
esac
|
||||
case $MINOR in *[!0-9]*)
|
||||
echo "$MINOR is not a number"
|
||||
exit 1
|
||||
esac
|
||||
case $MICRO in *[!0-9]*)
|
||||
echo "$MICRO is not a number"
|
||||
exit 1
|
||||
esac
|
||||
echo "changing version to $MAJOR.$MINOR.$MICRO"
|
||||
sed -e "s/^AC_INIT(\[\([^ ]*\)\], \[[^ ]*\]\(.*\)/AC_INIT([\1], [$MAJOR.$MINOR.$MICRO]\2/" configure.ac > configure.ac~
|
||||
mv configure.ac~ configure.ac
|
||||
cat > cmd.sed <<\_EOF
|
||||
s/^[ \t]*FILEVERSION[ \t]*.*,.*,.*,\(.*\)/ FILEVERSION @@MAJOR@@,@@MINOR@@,@@MICRO@@,\1/
|
||||
s/^[ \t]*PRODUCTVERSION[ \t]*.*,.*,.*,\(.*\)/ PRODUCTVERSION @@MAJOR@@,@@MINOR@@,@@MICRO@@,\1/
|
||||
s/^\([ \t]*\)VALUE[ \t]*"FileVersion",[ \t]*".*\..*\..*\.\(.*\)"/\1VALUE "FileVersion", "@@MAJOR@@.@@MINOR@@.@@MICRO@@.\2"/
|
||||
s/^\([ \t]*\)VALUE[ \t]*"ProductVersion",[ \t]*".*\..*\..*\.\(.*\)"/\1VALUE "ProductVersion", "@@MAJOR@@.@@MINOR@@.@@MICRO@@.\2"/
|
||||
s/^\(.*\)"Rufus v\(.*\)\.\(.*\)"\(.*\)/\1"Rufus v@@MAJOR@@.@@MINOR@@.@@MICRO@@.\3"\4/
|
||||
s/^\(.*\)"Version \(.*\) (\(.*\)"\(.*\)/\1"Version @@MAJOR@@.@@MINOR@@.@@MICRO@@ (\3"\4/
|
||||
_EOF
|
||||
|
||||
# First run sed to substitute our variable in the sed command file
|
||||
sed -e "s/@@MAJOR@@/$MAJOR/g" -e "s/@@MINOR@@/$MINOR/g" -e "s/@@MICRO@@/$MICRO/g" cmd.sed > cmd.sed~
|
||||
mv cmd.sed~ cmd.sed
|
||||
sed -f cmd.sed ./rufus.rc > ./rufus.rc~
|
||||
sed 's/$/\r/' ./rufus.rc~ > ./rufus.rc
|
||||
rm ./rufus.rc~
|
||||
rm cmd.sed
|
|
@ -29,8 +29,7 @@ s/^[ \t]*FILEVERSION[ \t]*\(.*\),\(.*\),\(.*\),.*/ FILEVERSION \1,\2,\3,@@TAGVER
|
|||
s/^[ \t]*PRODUCTVERSION[ \t]*\(.*\),\(.*\),\(.*\),.*/ PRODUCTVERSION \1,\2,\3,@@TAGVER@@/
|
||||
s/^\([ \t]*\)VALUE[ \t]*"FileVersion",[ \t]*"\(.*\)\..*"/\1VALUE "FileVersion", "\2.@@TAGVER@@"/
|
||||
s/^\([ \t]*\)VALUE[ \t]*"ProductVersion",[ \t]*"\(.*\)\..*"/\1VALUE "ProductVersion", "\2.@@TAGVER@@"/
|
||||
s/^\(.*\)ufus v\(.*\)\.\(.*\)"\(.*\)/\1ufus v\2.@@TAGVER@@"\4/
|
||||
s/^zadig_version=\(.*\)\..*/rufus_version=\1.@@TAGVER@@/
|
||||
s/^\(.*\)"Rufus v\(.*\)\.\(.*\)"\(.*\)/\1"Rufus v\2.@@TAGVER@@"\4/
|
||||
s/^\(.*\)"Version \(.*\) (Build \(.*\))"\(.*\)/\1"Version \2 (Build @@TAGVER@@)"\4/
|
||||
_EOF
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
AC_INIT([rufus], [1.0.0], [https://github.com/pbatard/rufus/issues], [rufus], [https://github.com/pbatard/rufus])
|
||||
AC_INIT([rufus], [1.0.1], [https://github.com/pbatard/rufus/issues], [rufus], [https://github.com/pbatard/rufus])
|
||||
AM_INIT_AUTOMAKE([-Wno-portability foreign])
|
||||
AC_CONFIG_SRCDIR([rufus.c])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
|
12
rufus.rc
12
rufus.rc
|
@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 263
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.0.0.67"
|
||||
CAPTION "Rufus v1.0.1.68"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,223,50,14
|
||||
|
@ -63,7 +63,7 @@ BEGIN
|
|||
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
|
||||
CONTROL "<a href=""https://github.com/pbatard/rufus/wiki/Rufus"">https://github.com/pbatard/rufus</a>",IDC_ABOUT_RUFUS_URL,
|
||||
"SysLink",WS_TABSTOP,46,47,114,9
|
||||
LTEXT "Version 1.0.0 (Build 67)",IDC_STATIC,46,19,78,8
|
||||
LTEXT "Version 1.0.1 (Build 68)",IDC_STATIC,46,19,78,8
|
||||
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP
|
||||
EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL
|
||||
LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
|
||||
|
@ -162,8 +162,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,67
|
||||
PRODUCTVERSION 1,0,0,67
|
||||
FILEVERSION 1,0,1,68
|
||||
PRODUCTVERSION 1,0,1,68
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -180,13 +180,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "akeo.ie"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.0.0.67"
|
||||
VALUE "FileVersion", "1.0.1.68"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.0.0.67"
|
||||
VALUE "ProductVersion", "1.0.1.68"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue