File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 2323if (CONFIG_NETUTILS_CJSON)
2424
2525 if (NOT CONFIG_NETUTILS_CJSON_URL)
26- set (CONFIG_NETUTILS_CJSON_URL "https://github.com/DaveGamble/cJSON/archive" )
26+ set (CONFIG_NETUTILS_CJSON_URL
27+ "https://github.com/DaveGamble/cJSON/archive/refs/tags" )
2728 endif ()
2829
2930 if (NOT CONFIG_NETUTILS_CJSON_VERSION)
3031 set (CONFIG_NETUTILS_CJSON_VERSION "1.7.10" )
3132 endif ()
3233
33- # GitHub requires refs/tags/ in the archive URL for tag downloads
3434 if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR} /cJSON)
3535 FetchContent_Declare(
3636 cJSON
3737 DOWNLOAD_NAME "v${CONFIG_NETUTILS_CJSON_VERSION} .tar.gz"
3838 DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR}
39- URL "${CONFIG_NETUTILS_CJSON_URL} /refs/tags/ v${CONFIG_NETUTILS_CJSON_VERSION} .tar.gz"
39+ URL "${CONFIG_NETUTILS_CJSON_URL} /v${CONFIG_NETUTILS_CJSON_VERSION} .tar.gz"
4040 SOURCE_DIR
4141 ${CMAKE_CURRENT_LIST_DIR} /cJSON
4242 BINARY_DIR
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ if NETUTILS_CJSON
1414
1515config NETUTILS_CJSON_URL
1616 string "URL where cJSON library can be downloaded"
17- default "https://github.com/DaveGamble/cJSON/archive"
17+ default "https://github.com/DaveGamble/cJSON/archive/refs/tags "
1818
1919config NETUTILS_CJSON_VERSION
2020 string "Version number"
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ include $(APPDIR)/Make.defs
2828
2929WD := ${shell echo $(CURDIR ) | sed -e 's/ /\\ /g'}
3030
31- CONFIG_NETUTILS_CJSON_URL ?= "https://github.com/DaveGamble/cJSON/archive"
31+ CONFIG_NETUTILS_CJSON_URL ?= "https://github.com/DaveGamble/cJSON/archive/refs/tags "
3232CONFIG_NETUTILS_CJSON_VERSION ?= "1.7.10"
3333CJSON_VERSION = $(patsubst "% ",% ,$(strip $(CONFIG_NETUTILS_CJSON_VERSION ) ) )
3434
@@ -49,12 +49,10 @@ CSRCS = $(CJSON_SRCDIR)$(DELIM)cJSON.c
4949CSRCS += $(CJSON_SRCDIR )$(DELIM ) cJSON_Utils.c
5050
5151# Download and unpack tarball if no git repo found
52- # GitHub requires refs/tags/ in the archive URL for tag downloads (see
53- # https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives)
5452ifeq ($(wildcard $(CJSON_UNPACKNAME ) /.git) ,)
5553$(CJSON_TARBALL ) :
5654 @echo " Downloading: $( CJSON_TARBALL) "
57- $(Q ) curl -O -L $(CONFIG_NETUTILS_CJSON_URL ) /refs/tags/ $(CJSON_TARBALL )
55+ $(Q ) curl -O -L $(CONFIG_NETUTILS_CJSON_URL ) /$(CJSON_TARBALL )
5856
5957$(CJSON_UNPACKNAME ) : $(CJSON_TARBALL )
6058 @echo " Unpacking: $( CJSON_TARBALL) -> $( CJSON_UNPACKNAME) "
You can’t perform that action at this time.
0 commit comments