Skip to content

Commit 91f27c0

Browse files
author
Hadis Kakanejadi Fard
committed
updated PECL package version
1 parent cbafb6e commit 91f27c0

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

source/shared/version.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,25 @@
2727
#define SQLVERSION_PATCH 7
2828
#define SQLVERSION_BUILD 0
2929

30-
// Semantic versioning pre-release and buil metadata
31-
#define SEMVER_PRERELEASE "-preview"
30+
// Semantic versioning pre-release, for stable releases should be empty
31+
#define SEMVER_PRERELEASE "preview"
32+
// Semantic versioning build metadata
3233
#define SEMVER_BUILDMETA
3334

3435
#if SQLVERSION_BUILD > 0
3536
#undef SEMVER_BUILDMETA
3637
#define SEMVER_BUILDMETA "+" STRINGIFY( SQLVERSION_BUILD )
3738
#endif
3839

39-
#define VER_FILEVERSION_STR STRINGIFY( SQLVERSION_MAJOR ) "." STRINGIFY( SQLVERSION_MINOR ) "." STRINGIFY( SQLVERSION_PATCH ) SEMVER_PRERELEASE SEMVER_BUILDMETA
40+
// Main version
41+
#define VER_APIVERSION_STR STRINGIFY( SQLVERSION_MAJOR ) "." STRINGIFY( SQLVERSION_MINOR ) "." STRINGIFY( SQLVERSION_PATCH )
42+
43+
// Remove "-" if SEMVER_PRERELEASE is empty (for stable releases)
44+
#define VER_FILEVERSION_STR VER_APIVERSION_STR "-" SEMVER_PRERELEASE SEMVER_BUILDMETA
4045
#define _FILEVERSION SQLVERSION_MAJOR,SQLVERSION_MINOR,SQLVERSION_PATCH,SQLVERSION_BUILD
4146

42-
//PECL extension verison macros
43-
#define PHP_SQLSRV_VERSION VER_FILEVERSION_STR
44-
#define PHP_PDO_SQLSRV_VERSION VER_FILEVERSION_STR
47+
// PECL package version macros (can't have '-' or '+')
48+
#define PHP_SQLSRV_VERSION VER_APIVERSION_STR SEMVER_PRERELEASE
49+
#define PHP_PDO_SQLSRV_VERSION PHP_SQLSRV_VERSION
4550

4651
#endif // VERSION_H
47-
48-

0 commit comments

Comments
 (0)