Skip to content

Commit 2f6202a

Browse files
author
EC2 Default User
committed
Update build layer script
1 parent 2e5d171 commit 2f6202a

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

build-layer.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ rm -rf node_modules package*.json
33
npm init -y
44
npm install canvas --build-from-source
55
npm install mocha --save-dev
6+
CANVAS_VERSION=$(jq -r '.dependencies.canvas[1:]' package.json)
7+
jq --arg CANVAS_VERSION "$CANVAS_VERSION" '.name = "canvas-nodejs" | .version = $CANVAS_VERSION | .license = "MIT" | .author = "Charoite Lee" | .scripts.test = "mocha"' package.json > package-tmp.json
8+
mv -f package-tmp.json package.json
9+
npm test
610
cp package-lock.json ..
711
cd ..
8-
rm ../canvas-nodejs_v2.8.0.zip
9-
zip -r ../canvas-nodejs_v2.8.0.zip . -x "LICENSE" "README.md" ".git*" "nodejs/test/*" "*.yml" "build-layer.sh"
12+
rm ../canvas-nodejs_v$CANVAS_VERSION.zip
13+
zip -q -r ../canvas-nodejs_v$CANVAS_VERSION.zip . -x "LICENSE" "README.md" ".git*" "nodejs/test/*" "*.yml" "build-layer.sh"

nodejs/node_modules/canvas/build/Makefile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"name": "nodejs",
3-
"version": "1.0.0",
2+
"name": "canvas-nodejs",
3+
"version": "2.8.0",
44
"description": "",
55
"main": "index.js",
66
"directories": {
77
"test": "test"
88
},
99
"scripts": {
10-
"test": "echo \"Error: no test specified\" && exit 1"
10+
"test": "mocha"
1111
},
1212
"keywords": [],
13-
"author": "",
14-
"license": "ISC",
13+
"author": "Charoite Lee",
14+
"license": "MIT",
1515
"dependencies": {
1616
"canvas": "^2.8.0"
1717
},

0 commit comments

Comments
 (0)