Skip to content

Commit fae1824

Browse files
committed
updating makefile with defaults command
1 parent ffb6d38 commit fae1824

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

Makefile

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,43 @@
1+
# CODEFLARE_SDK_VERSION defines the default version of the CodeFlare SDK
2+
CODEFLARE_SDK_VERSION ?= 0.9.0
3+
4+
# RAY_VERSION defines the default version of Ray (used for testing)
5+
RAY_VERSION ?= 2.5.0
6+
7+
# RAY_IMAGE defines the default container image for Ray (used for testing)
8+
RAY_IMAGE ?= rayproject/ray:$(RAY_VERSION)
9+
10+
##@ Development
11+
12+
DEFAULTS_TEST_FILE := support/defaults.go
13+
14+
.PHONY: defaults
15+
defaults:
16+
$(info Regenerating $(DEFAULTS_TEST_FILE))
17+
@echo "package support" > $(DEFAULTS_TEST_FILE)
18+
@echo "" >> $(DEFAULTS_TEST_FILE)
19+
@echo "// ***********************" >> $(DEFAULTS_TEST_FILE)
20+
@echo "// DO NOT EDIT THIS FILE" >> $(DEFAULTS_TEST_FILE)
21+
@echo "// ***********************" >> $(DEFAULTS_TEST_FILE)
22+
@echo "" >> $(DEFAULTS_TEST_FILE)
23+
@echo "const (" >> $(DEFAULTS_TEST_FILE)
24+
@echo " CodeFlareSDKVersion = \"$(CODEFLARE_SDK_VERSION)\"" >> $(DEFAULTS_TEST_FILE)
25+
@echo " RayVersion = \"$(RAY_VERSION)\"" >> $(DEFAULTS_TEST_FILE)
26+
@echo " RayImage = \"$(RAY_IMAGE)\"" >> $(DEFAULTS_TEST_FILE)
27+
@echo "" >> $(DEFAULTS_TEST_FILE)
28+
@echo ")" >> $(DEFAULTS_TEST_FILE)
29+
@echo "" >> $(DEFAULTS_TEST_FILE)
30+
31+
gofmt -w $(DEFAULTS_TEST_FILE)
32+
33+
134
## Location to install dependencies to
235
LOCALBIN ?= $(shell pwd)/bin
336
$(LOCALBIN):
437
mkdir -p $(LOCALBIN)
538

639
OPENSHIFT-GOIMPORTS ?= $(LOCALBIN)/openshift-goimports
740

8-
941
.PHONY: openshift-goimports
1042
openshift-goimports: $(OPENSHIFT-GOIMPORTS) ## Download openshift-goimports locally if necessary.
1143
$(OPENSHIFT-GOIMPORTS): $(LOCALBIN)

0 commit comments

Comments
 (0)