Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[oatpp-swagger] Feature/oatpp swagger 1.3.0 latest #42349

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions ports/oatpp-swagger/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
set(OATPP_VERSION "1.3.0")
set(OATPP_VERSION "1.3.0-latest")

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO oatpp/oatpp-swagger
REF ${OATPP_VERSION}
SHA512 5b4ced90690f484ebe15c3a0be47b1b851fb7b650e70c99fddc20430724aac8eff89d8c6187df750bd2ceff0e1144336f258d740fc10cdfa67a65a2f3b00d80b
SHA512 a6b3fce21bef57a055c498e80afefacf7b8219fc03381c468b8555c003566bc3e1ce0672670b46e99c51e090cd7000195c7dfeb0258851c4e05bec9ee4c652b3
HEAD_REF master
)

Expand All @@ -23,8 +23,15 @@ vcpkg_cmake_configure(
"-DOATPP_MSVC_LINK_STATIC_RUNTIME=${OATPP_MSVC_LINK_STATIC_RUNTIME}"
)

function(strip_version version output_var)
string(REGEX REPLACE "([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" stripped_version "${version}")
set(${output_var} "${stripped_version}" PARENT_SCOPE)
endfunction()

strip_version("${OATPP_VERSION}" OATPP_VERSION_STRIPPED)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME oatpp-swagger CONFIG_PATH lib/cmake/oatpp-swagger-${OATPP_VERSION})
vcpkg_cmake_config_fixup(PACKAGE_NAME oatpp-swagger CONFIG_PATH lib/cmake/oatpp-swagger-${OATPP_VERSION_STRIPPED})
vcpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
Expand Down
2 changes: 1 addition & 1 deletion ports/oatpp-swagger/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oatpp-swagger",
"version": "1.3.0",
"version": "1.3.0-latest",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, 1.3.0-latest is older than 1.3.0, so this will not have the sort order you want: https://learn.microsoft.com/vcpkg/users/versioning#version-semver

I filed oatpp/oatpp-swagger#95 against upstream to ask them to reconsider

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not like the sketchy version either, it also made it necessary to stip the suffix off the version in the port cmake file to fit the extracted file name... so this is clearly would be cleaner 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update, I closed the swagger issue and opened against the main repo instead, which has the same problem: oatpp/oatpp#988

"port-version": 1,
"description": "Oat++ OpenApi (Swagger) UI submodule.",
"homepage": "https://github.com/oatpp/oatpp-swagger",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6513,7 +6513,7 @@
"port-version": 1
},
"oatpp-swagger": {
"baseline": "1.3.0",
"baseline": "1.3.0-latest",
"port-version": 1
},
"oatpp-websocket": {
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/oatpp-swagger.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "274d2eee807e6e1ae0b77be706c5ec644fc042a4",
"version": "1.3.0-latest",
"port-version": 1
},
{
"git-tree": "b8935367b57b4203e0eba828a6b8f9cc5ebb659c",
"version": "1.3.0",
Expand Down
Loading