Skip to content

Commit

Permalink
Use CMake PROJECT_VERSION for everestjs package version
Browse files Browse the repository at this point in the history
Signed-off-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
hikinggrass committed Jan 6, 2025
1 parent c0872d6 commit cffdb2a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion everestjs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*node_modules
package-lock.json
package.json
package-lock.json
3 changes: 3 additions & 0 deletions everestjs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ if (NOT NODE_ADDON_API_PACKAGE_DIR)
endif ()
endif ()

# populate package.json with version information
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/package.json.in" "${CMAKE_CURRENT_SOURCE_DIR}/package.json" @ONLY)

execute_process(
COMMAND ${NODE} -p "require('node-addon-api').include"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
Expand Down
4 changes: 2 additions & 2 deletions everestjs/package.json → everestjs/package.json.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "everestjs",
"main": "index.js",
"version": "0.6.0",
"version": "@PROJECT_VERSION@",
"description": "EVerest API for node.js",
"dependencies": {
"node-addon-api": "^3.2.1"
"node-addon-api": "8.1"
}
}

0 comments on commit cffdb2a

Please sign in to comment.