Ricardo Constantino
2016-Nov-05 13:26 UTC
[opus] [PATCH] genversion.bat: don't overwrite version.mk
The automake script doesn't mess with it in any way, and the projects use win32/version.h and not version.mk. As it is works now, it's just an annoyance for VS devs that use git. --- win32/genversion.bat | 8 -------- 1 file changed, 8 deletions(-) diff --git a/win32/genversion.bat b/win32/genversion.bat index cd1d4dc..8b31831 100644 --- a/win32/genversion.bat +++ b/win32/genversion.bat @@ -24,17 +24,9 @@ set version=!version: =! :gotversion set version_out=#define %~2 "%version%" -set version_mk=%~2 = "%version%" echo %version_out%> "%~1_temp" -if %version%==unknown goto :skipgenerate - -echo # static version string; update manually every release.> "%~dp0..\version.mk" -echo %version_mk%>> "%~dp0..\version.mk" - -:skipgenerate - echo n | comp "%~1_temp" "%~1" > NUL 2> NUL if not errorlevel 1 goto exit -- 2.10.1
Ricardo Constantino
2016-Nov-06 01:57 UTC
[opus] [PATCH] genversion.bat: generate same version as update_version
Remove version.mk and references to it in the repo. genversion.bat will now generate the same version strings as update_version script, i.e. without 'v' prefix, without a fallback if git archive is used.If run from a release tarball it'll use package_version file, like configure. If run from a git repo, it will use the same 'git describe' with '-dirty' as update_version. --- If there's supposed to be a fallback for git archives, it should be used by both genversion.bat and update_version. Makefile.am | 3 +-- doc/release.txt | 1 - version.mk | 2 -- win32/genversion.bat | 15 +++++++-------- 4 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 version.mk diff --git a/Makefile.am b/Makefile.am index 0f0a6d4..03a207e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -157,8 +157,7 @@ opus_custom_demo_LDADD = libopus.la $(LIBM) endif endif -EXTRA_DIST = version.mk \ - opus.pc.in \ +EXTRA_DIST = opus.pc.in \ opus-uninstalled.pc.in \ opus.m4 \ Makefile.mips \ diff --git a/doc/release.txt b/doc/release.txt index 0857839..ebe9af1 100644 --- a/doc/release.txt +++ b/doc/release.txt @@ -4,7 +4,6 @@ - Check for uncommitted changes to master. - Update OPUS_LT_* API versioning in configure.ac. -- Update the version in version.mk - Tag the release commit with 'git tag -s vN.M'. - Include release notes in the tag annotation. - Verify 'make distcheck' produces a tarball with diff --git a/version.mk b/version.mk deleted file mode 100644 index 9dd5753..0000000 --- a/version.mk +++ /dev/null @@ -1,2 +0,0 @@ -# static version string; update manually every release. -PACKAGE_VERSION = "1.2-alpha" diff --git a/win32/genversion.bat b/win32/genversion.bat index 8b31831..1def746 100644 --- a/win32/genversion.bat +++ b/win32/genversion.bat @@ -2,13 +2,13 @@ setlocal enableextensions enabledelayedexpansion -for /f %%v in ('git --git-dir="%~dp0..\.git" describe --tags --match "v*"') do set version=%%v +for /f %%v in ('cd "%~dp0.." ^&^& git status ^>NUL 2^>NUL ^&^& git describe --tags --match "v*" --dirty 2^>NUL') do set version=%%v -if not "%version%"=="" goto :gotversion +if not "%version%"=="" set version=!version:~1! && goto :gotversion -if exist "%~dp0..\version.mk" goto :getversion +if exist "%~dp0..\package_version" goto :getversion -echo Git cannot be found, nor can version.mk. Generating unknown version. +echo Git cannot be found, nor can package_version. Generating unknown version. set version=unknown @@ -16,13 +16,12 @@ goto :gotversion :getversion -for /f "delims== tokens=2" %%v in (%~dps0..\version.mk) do set version=%%v - -set version=!version:^"=! -set version=!version: =! +for /f "delims== tokens=2" %%v in (%~dps0..\package_version) do set version=%%v +set version=!version:"=! :gotversion +set version=!version: =! set version_out=#define %~2 "%version%" echo %version_out%> "%~1_temp" -- 2.10.1
Maybe Matching Threads
- [PATCH] Fixed genversion.bat to accept quotations in argument
- opus_multistream_encode_float not working in libopus 1.1
- Grouped weighted.mean
- [PATCH 1/4] Create a simple project to create version.h to run before any other
- opus_multistream_encode_float not working in libopus 1.1