Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 6e005fc

Browse files
author
Simon Hofmann
committed
Added prebuild build task
1 parent 8972967 commit 6e005fc

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

ci/prebuild/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ARG TAG
2+
3+
FROM justadudewhohacks/opencv4nodejs-ci:${TAG}
4+
5+
COPY ./ ./
6+
CMD ["bin/bash", "./ci/prebuild/script/run-prebuild.sh"]

ci/prebuild/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"scripts": {
3+
"prebuild": "bash ./prebuild.sh"
4+
},
5+
"dependencies": {
6+
"prebuild": "^8.2.0"
7+
}
8+
}

ci/prebuild/prebuild.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
image=opencv4nodejs-ci_$1
3+
docker build -t $image -f ./Dockerfile --build-arg TAG=$1 ../../
4+
docker run $image

ci/prebuild/script/run-prebuild.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
export OPENCV4NODEJS_DISABLE_AUTOBUILD=1
3+
echo "Installing dependencies" &&\
4+
npm install --unsafe-perm &&\
5+
echo "Running prebuild" &&\
6+
cd ./prebuild &&\
7+
npm install --unsafe-perm &&\
8+
npm run prebuild

0 commit comments

Comments
 (0)