UNPKG

2.12 kBPlain TextView Raw
1# CodeGradXvmauthor
2
3work : lint tests
4clean :
5 -rm .fw4ex.json [0-9]*ml
6 -rm -rf tmp
7
8# ############## Working rules:
9
10lint :
11 jshint codegradxvmauthor.js spec/*.js
12
13tests : clean import
14 -rm .fw4ex.json [0-9]*ml
15 jasmine
16 bash -x shtests/10-job.sh
17 bash -x shtests/20-exercise.sh
18 bash -x shtests/30-batch.sh
19
20reset :
21 npm install -g codegradxlib
22 npm link codegradxlib
23 npm install -g codegradxagent
24 npm link codegradxagent
25
26refresh :
27 cp -p ../CodeGradXlib/codegradxlib.js \
28 node_modules/codegradxagent/node_modules/codegradxlib/
29 cp -p ../CodeGradXagent/codegradxagent.js \
30 node_modules/codegradxagent/
31
32test-all :
33 cd ../CodeGradXlib/ && m tests
34 cd ../CodeGradXagent/ && m tests
35 cd ../CodeGradXvmauthor/ && m tests
36
37import :
38 cd spec/ && ln -sf ../../CodeGradXlib/spec/vmauth-data.json .
39 cd spec/ && cp -pf ../../CodeGradXlib/spec/oefgc.tgz .
40 cd spec/ && cp -rpf ../../CodeGradXlib/spec/oefgc .
41 cd spec/ && cp -pf ../../CodeGradXlib/spec/min.c .
42 cd spec/ && \
43 cp -pf ../../CodeGradXlib/spec/org.example.fw4ex.grading.check.tgz .
44
45# ############## NPM package
46# Caution: npm takes the whole directory that is . and not the sole
47# content of CodeGradXvmauthor.tgz
48
49publish : clean
50 -rm -rf node_modules/codegradx*
51 npm install -S codegradxagent
52 git status .
53 -git commit -m "NPM publication `date`" .
54 git push
55 -rm -f CodeGradXvmauthor.tgz
56 m CodeGradXvmauthor.tgz install
57 cd tmp/CodeGradXvmauthor/ && npm version patch && npm publish
58 cp -pf tmp/CodeGradXvmauthor/package.json .
59 rm -rf tmp
60 npm install -g codegradxvmauthor
61
62CodeGradXvmauthor.tgz : clean
63 -rm -rf tmp
64 mkdir -p tmp
65 cd tmp/ && git clone https://github.com/ChristianQueinnec/CodeGradXvmauthor.git
66 rm -rf tmp/CodeGradXvmauthor/.git
67 cp -p package.json tmp/CodeGradXvmauthor/
68 tar czf CodeGradXvmauthor.tgz -C tmp CodeGradXvmauthor
69 tar tzf CodeGradXvmauthor.tgz
70
71REMOTE = www.paracamplus.com
72install : CodeGradXvmauthor.tgz
73 rsync -avu CodeGradXvmauthor.tgz \
74 ${REMOTE}:/var/www/www.paracamplus.com/Resources/Javascript/
75
76# ##############
77init :
78 @echo "Answer the following questions:"
79 npm init
80
81# end of Makefile