Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
sefarad
dashboard-gsicrawler
Commits
24d85b18
Commit
24d85b18
authored
Oct 03, 2017
by
J. Fernando Sánchez
Browse files
Merge branch 'meaningcloud' into 'master'
Updated makefiles from meaningcloud See merge request docs/templates/makefiles!7
parents
4f88009b
d1503217
Changes
3
Hide whitespace changes
Inline
Side-by-side
base.mk
View file @
24d85b18
...
...
@@ -2,18 +2,16 @@ export
NAME
?=
$(
shell
basename
$(CURDIR)
)
VERSION
?=
$(
shell
git describe
--tags
--dirty
2>/dev/null
)
ifeq
($(wildcard $VERSION),)
VERSION
:=
unknown
endif
# Get the location of this makefile.
MK_DIR
:=
$(
dir
$(
abspath
$(
lastword
$(MAKEFILE_LIST)
)))
-include
.env
-include
../.env
.FORCE
:
version
:
.FORCE
@
echo
$(VERSION)
>
$(NAME)
/VERSION
@
echo
$(VERSION)
help
:
##
Show this help.
@
fgrep
-h
"##"
$(MAKEFILE_LIST)
| fgrep
-v
fgrep |
sed
-e
's/\\$$//'
|
sed
-e
's/\(.*:\)[^#]*##\s*\(.*\)/\1\t\2/'
| column
-t
-s
" "
...
...
@@ -35,4 +33,4 @@ include $(MK_DIR)/git.mk
info
::
##
List all variables
env
.PHONY
::
config help ci
version .FORCE
.PHONY
::
config help ci
docker.mk
View file @
24d85b18
IMAGEWTAG
?=
$(IMAGENAME)
:
$(VERSION)
IMAGENAME
?=
$(NAME)
IMAGEWTAG
?=
$(IMAGENAME)
:
$(VERSION)
docker-login
:
##
Log in to the registry. It will only be used in the server
,
or when running a CI task locally (if CI_BUILD_TOKEN is set).
ifeq
($(CI_BUILD_TOKEN),)
...
...
@@ -22,4 +23,7 @@ login:: docker-login
clean
::
docker-clean
docker-info
:
@
echo
IMAGEWTAG
=
${IMAGEWTAG}
.PHONY
::
docker-login docker-clean login clean
python.mk
View file @
24d85b18
PYVERSIONS
?=
2.7
PYMAIN
?=
$(
firstword
$(PYVERSIONS)
)
TARNAME
?=
$(NAME)
-
$(VERSION)
.tar.gz
VERSIONFILE
?=
$(NAME)
/VERSION
DEVPORT
?=
6000
.FORCE
:
version
:
.FORCE
@
echo
$(VERSION)
>
$(VERSIONFILE)
@
echo
$(VERSION)
yapf
:
##
Format python code
yapf
-i
-r
$(NAME)
yapf
-i
-r
tests
...
...
@@ -89,4 +97,4 @@ clean:: ## Clean older docker images and containers related to this project and
@
docker ps
-a
|
grep
$(IMAGENAME)
|
awk
'{ split($$2, vers, "-"); if(vers[0] != "
${VERSION}
"){ print $$1;}}'
| xargs docker
rm
-v
2>/dev/null||
true
@
docker images |
grep
$(IMAGENAME)
|
awk
'{ split($$2, vers, "-"); if(vers[0] != "
${VERSION}
"){ print $$1":"$$2;}}'
| xargs docker rmi 2>/dev/null||
true
.PHONY
::
yapf dockerfiles Dockerfile-% quick_build build build-% dev-% quick-dev test quick_test push-latest push-latest-% push-% push
.PHONY
::
yapf dockerfiles Dockerfile-% quick_build build build-% dev-% quick-dev test quick_test push-latest push-latest-% push-% push
version .FORCE
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment