forked from cgasparini/vpp-sample-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makeroutines.mk
25 lines (23 loc) · 1.24 KB
/
Makeroutines.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# install dependencies according to glide.yaml & glide.lock (in case vendor dir was deleted)
define install_dependencies
$(if $(shell command -v glide install 2> /dev/null),$(info glide dependency manager is ready),$(error glide dependency manager missing, info about installation can be found here https://github.com/Masterminds/glide))
@echo "# installing dependencies, please wait ..."
@glide install --strip-vendor
endef
# clean update dependencies according to glide.yaml (re-downloads all of them)
define update_dependencies
$(if $(shell command -v glide install 2> /dev/null),$(info glide dependency manager is ready),$(error glide dependency manager missing, info about installation can be found here https://github.com/Masterminds/glide))
@echo "# updating dependencies, please wait ..."
@-cd vendor && rm -rf *
@echo "# vendor dir cleared"
@-rm -rf glide.lock
@glide cc
@echo "# glide cache cleared"
@glide install --strip-vendor
endef
# fix sirupsen/Sirupsen problem
define fix_sirupsen_case_sensitivity_problem
@echo "# fixing sirupsen case sensitivity problem, please wait ..."
@-rm -rf vendor/github.com/Sirupsen
@-find ./ -type f -name "*.go" -exec sed -i -e 's/github.com\/Sirupsen\/logrus/github.com\/sirupsen\/logrus/g' {} \;
endef