提交 c7a9b839 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

add wechaty-version util

上级 a2139278
......@@ -14,7 +14,7 @@ RUN groupadd -r wechaty && useradd -m -r -g wechaty wechaty -d /wechaty
WORKDIR /wechaty
COPY . .
RUN npm install
RUN npm install && npm link
COPY entrypoint.sh /entrypoint.sh
RUN bash -n /entrypoint.sh && chmod a+x /entrypoint.sh
......
#!/usr/bin/env node
const { Wechaty } = require('..')
const w = new Wechaty()
console.log(w.version())
......@@ -3,7 +3,7 @@
# Credit: https://github.com/cusspvz/node.docker/blob/master/entrypoint
#
echo 'Wechaty Docker Starting'
echo "Docker Starting Wechaty v$(wechaty-version)"
# to identify run env (for tests)
export WECHATY_DOCKER='docker'
......
......@@ -22,7 +22,8 @@
"url": "git+https://github.com/zixia/wechaty.git"
},
"bin": {
"io-bot": "bin/io-bot.js"
"io-bot": "bin/io-bot.js",
"wechaty-version": "bin/version.js"
},
"keywords": [
"wechat",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册