@@ -21,7 +21,7 @@ module.exports = {
21
21
let { print } = toolbox
22
22
23
23
// Read CLI parameters
24
- let { h, help, v, version, c, coverage, l , lib } = toolbox . parameters . options
24
+ let { h, help, v, version, c, coverage } = toolbox . parameters . options
25
25
let datasource = toolbox . parameters . first
26
26
27
27
// Support both long and short option variants
@@ -64,7 +64,7 @@ RUN apt install -y curl
64
64
RUN npm install -g @graphprotocol/graph-cli
65
65
66
66
# Download the latest linux binary
67
- RUN curl -OL https://github.com/LimeChain/matchstick/releases/download/0.2.2a/binary-linux-20
67
+ RUN curl -OL https://github.com/LimeChain/matchstick/releases/download/${ version || " 0.2.2a" } /binary-linux-20
68
68
# Make it executable
69
69
RUN chmod a+x binary-linux-20
70
70
@@ -97,7 +97,7 @@ CMD ../binary-linux-20 \${ARGS}
97
97
}
98
98
} )
99
99
100
- exec ( `docker build -f tests/.docker/Dockerfile - t matchstick . ` , ( error , stdout , stderr ) => {
100
+ exec ( `docker build -t matchstick .` , ( error , stdout , stderr ) => {
101
101
print . info ( 'Building Matchstick image...' ) ;
102
102
103
103
if ( error ) {
@@ -109,8 +109,8 @@ CMD ../binary-linux-20 \${ARGS}
109
109
print . info ( `stderr: ${ stderr } ` )
110
110
}
111
111
112
- // TODO: try flags
113
- let runCommand = `docker run --rm matchstick` ;
112
+ //docker run -it --rm --mount type=bind,source=$PWD,target=/matchstick -e ARGS="-c" matchstick
113
+ let runCommand = `docker run -it --rm --mount type=bind,source=$PWD,target=/matchstick -e ARGS=" ${ datasource || '' } ${ coverage ? '-c' : '' } " matchstick` ;
114
114
115
115
exec ( runCommand , ( error , stdout , stderr ) => {
116
116
print . info ( 'Running Matchstick image...' ) ;
0 commit comments