File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 11# Destination folder for the downloaded libraries
22LIBS_DIR := $(abspath ./libs)
33
4- UNAME_S := $(shell uname -s)
54# Flags for CGO to find the headers and the shared library
5+ UNAME_S := $(shell uname -s)
66ifeq ($(UNAME_S ) ,Darwin)
77 CGO_CFLAGS := -I$(LIBS_DIR)
88 CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,@executable_path/libs
@@ -21,14 +21,17 @@ endif
2121OS ?= "linux"
2222ARCH ?= "amd64"
2323VERSION ?= "v0.0.17"
24- LATEST_URL := "https://github.com/codex-storage/codex-go-bindings/releases/latest/download/codex-${OS}-${ARCH}.zip"
25- VERSIONED_URL := "https://github.com/codex-storage/codex-go-bindings/releases/download/$(VERSION ) /codex-${OS}-${ARCH}.zip"
24+ DOWNLOAD_URL ?= "https://github.com/codex-storage/codex-go-bindings/releases/latest/download/codex-${OS}-${ARCH}.zip"
25+
26+ ifneq ($(VERSION ) ,)
27+ DOWNLOAD_URL := "https://github.com/codex-storage/codex-go-bindings/releases/download/$(VERSION)/codex-${OS}-${ARCH}.zip"
28+ endif
2629
2730all : run
2831
2932fetch :
30- @echo " Fetching libcodex from GitHub Actions: ${LATEST_URL } "
31- curl -fSL --create-dirs -o $(LIBS_DIR ) /codex-${OS} -${ARCH} .zip ${LATEST_URL }
33+ @echo " Fetching libcodex from GitHub Actions from : ${DOWNLOAD_URL } "
34+ curl -fSL --create-dirs -o $(LIBS_DIR ) /codex-${OS} -${ARCH} .zip ${DOWNLOAD_URL }
3235 unzip -o -qq $(LIBS_DIR ) /codex-${OS} -${ARCH} .zip -d $(LIBS_DIR )
3336 rm -f $(LIBS_DIR ) /* .zip
3437# Update the path to the shared library on macOS
You can’t perform that action at this time.
0 commit comments