Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use MAJOR.MINOR as the version number for the extension. This allows

us to make bug fix releases by updating the build number without requiring
a schema update, but fixes that alter SQL object definitions with a minor
version bump, and schema changes with a major version bump.
  • Loading branch information...
commit 82dff599296159f8fb09f955e716b4e1cc5da476 1 parent c992425
@dpage dpage authored
View
8 CMakeLists.txt
@@ -144,12 +144,12 @@ INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION .)
# Extension
IF(PG_EXTENSION)
ADD_CUSTOM_COMMAND(
- OUTPUT pgagent--${VERSION}.sql pgagent.control
- COMMAND ${CMAKE_COMMAND} -D VERSION=${VERSION} -P cmake/MakeExt.cmake
+ OUTPUT pgagent--${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.sql pgagent.control
+ COMMAND ${CMAKE_COMMAND} -D MAJOR_VERSION=${CPACK_PACKAGE_VERSION_MAJOR} -D MINOR_VERSION=${CPACK_PACKAGE_VERSION_MINOR} -P cmake/MakeExt.cmake
MAIN_DEPENDENCY sql/pgagent.sql
)
- ADD_CUSTOM_TARGET(run ALL DEPENDS pgagent--${VERSION}.sql pgagent.control)
- INSTALL(FILES pgagent--${VERSION}.sql DESTINATION ${PG_SHARE_DIR}/extension)
+ ADD_CUSTOM_TARGET(run ALL DEPENDS pgagent--${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.sql pgagent.control)
+ INSTALL(FILES pgagent--${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.sql DESTINATION ${PG_SHARE_DIR}/extension)
FILE(GLOB SQL "${CMAKE_CURRENT_SOURCE_DIR}/sql/*--*.sql")
FILE(GLOB CONTROL "${CMAKE_CURRENT_SOURCE_DIR}/*.control")
INSTALL(FILES pgagent.control ${CONTROL} ${SQL} DESTINATION ${PG_SHARE_DIR}/extension)
View
2  cmake/MakeExt.cmake
@@ -13,6 +13,6 @@ STRING(REPLACE "BEGIN TRANSACTION;" "" PGAGENT_SQL "${PGAGENT_SQL}")
STRING(REPLACE "COMMIT TRANSACTION;" "" PGAGENT_SQL "${PGAGENT_SQL}")
STRING(REPLACE "CREATE SCHEMA pgagent;" "" PGAGENT_SQL "${PGAGENT_SQL}")
STRING(REPLACE "-- EXT SELECT" "SELECT" PGAGENT_SQL "${PGAGENT_SQL}")
-FILE(WRITE "pgagent--${VERSION}.sql" "${PGAGENT_SQL}")
+FILE(WRITE "pgagent--${MAJOR_VERSION}.${MINOR_VERSION}.sql" "${PGAGENT_SQL}")
CONFIGURE_FILE(pgagent.control.in pgagent.control)
View
2  pgagent.control.in
@@ -1,6 +1,6 @@
# pgagent extension
comment = 'A PostgreSQL job scheduler'
-default_version = '${VERSION}'
+default_version = '${MAJOR_VERSION}.${MINOR_VERSION}'
relocatable = false
superuser = false
schema = pgagent
View
0  sql/pgagent--unpackaged--3.sql → sql/pgagent--unpackaged--3.4.sql
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.