-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (23 loc) · 881 Bytes
/
Makefile
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
26
27
28
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
.PHONY: help grade
# help: @ Lists available make tasks
help:
@egrep -oh '[0-9a-zA-Z_\.\-]+:.*?@ .*' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?@ "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | sort
# grade: @ Run the grading process for this exercise.
GRADING_FILES = grading.rsync-filter.txt
grade: SUBMISSION_DIR?=${PWD}
grade: GRADER_IMAGE=wethinkcode/weshare-js
grade: GRADE_CMD=mvn test
grade:
@echo +++ Copying protected/grading files over student submission dir: $(SUBMISSION_DIR)
rsync -av --include-from "$(GRADING_FILES)" . "$(SUBMISSION_DIR)" --ignore-times
@echo +++ Running grading command
pushd "$(SUBMISSION_DIR)"
docker run -t -v $(SUBMISSION_DIR):/app $(GRADER_IMAGE):latest '$(GRADE_CMD)'
popd