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

Add: examples: cpp: CMake Standalone auto fetch latest available tag [todo] #68

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RaulTrombin
Copy link
Member

Details:
image
image


# Function to fetch latest release version from GitHub
function(fetch_latest_release owner_name repo_name out_variable)
file(DOWNLOAD "https://api.github.com/repos/${owner_name}/${repo_name}/releases/latest" "${CMAKE_BINARY_DIR}/latest_release.json" TLS_VERIFY ON)
Copy link
Member

Choose a reason for hiding this comment

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

Use CMAKE_BUILD_DIR over CMAKE_BINARY_DIR, otherwise the artifact folder will also contain the json file as well. it's a temporary file, it should exist in a temporary folder.

Copy link
Member Author

@RaulTrombin RaulTrombin Mar 14, 2024

Choose a reason for hiding this comment

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

can't use CMAKE_BUILD_DIR,
tried CMAKE_CACHEFILE_DIR, but to make it works you need to run twice (something related to permissions)

was unable to find CMAKE_BUILD_DIR
https://cmake.org/cmake/help/latest/search.html?q=CMAKE_BUILD_

@RaulTrombin RaulTrombin marked this pull request as draft March 15, 2024 01:57
@RaulTrombin RaulTrombin changed the title Add: examples: cpp: CMake Standalone auto fetch latest release tag Add: examples: cpp: CMake Standalone auto fetch latest available tag [todo] Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants