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

merge

{ {
"name": "wechaty", "name": "wechaty",
"version": "0.46.5", "version": "0.47.6",
"description": "Wechaty is Conversational SDK Chatbot Makers, Powered by TypeScript, Docker, and 💖", "description": "Wechaty is Conversational SDK Chatbot Makers, Powered by TypeScript, Docker, and 💖",
"main": "dist/src/mod.js", "main": "dist/src/mod.js",
"typings": "dist/src/mod.d.ts", "typings": "dist/src/mod.d.ts",
...@@ -102,8 +102,8 @@ ...@@ -102,8 +102,8 @@
"state-switch": "^0.9.9", "state-switch": "^0.9.9",
"typed-emitter": "^1.2.0", "typed-emitter": "^1.2.0",
"watchdog": "^0.8.17", "watchdog": "^0.8.17",
"wechaty-puppet-hostie": "^0.9.13",
"wechaty-puppet": "^0.30.3", "wechaty-puppet": "^0.30.3",
"wechaty-puppet-hostie": "^0.9.1",
"ws": "^7.2.3" "ws": "^7.2.3"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -5,12 +5,7 @@ set -eo pipefail ...@@ -5,12 +5,7 @@ set -eo pipefail
function deployVersion () { function deployVersion () {
ARTIFACT_IMAGE=$1 ARTIFACT_IMAGE=$1
IMAGE=$2 IMAGE=$2
VERSION=$3 TAG=$3
SEMVER_MAJOR=$(echo "$VERSION" | cut -d. -f1)
SEMVER_MINOR=$(echo "$VERSION" | cut -d. -f2)
TAG="$SEMVER_MAJOR.$SEMVER_MINOR"
echo "Deploying TAG=$TAG" echo "Deploying TAG=$TAG"
docker tag "${ARTIFACT_IMAGE}" "${IMAGE}:${TAG}" docker tag "${ARTIFACT_IMAGE}" "${IMAGE}:${TAG}"
...@@ -62,7 +57,7 @@ __DOCKERFILE_ONBUILD__ ...@@ -62,7 +57,7 @@ __DOCKERFILE_ONBUILD__
} }
function main () { function main () {
artifactImage='wechaty:dev' artifactImage='wechaty:artifact'
dockerImage='wechaty/wechaty' dockerImage='wechaty/wechaty'
# Shellcheck - https://github.com/koalaman/shellcheck/wiki/SC2086 # Shellcheck - https://github.com/koalaman/shellcheck/wiki/SC2086
...@@ -96,10 +91,14 @@ function main () { ...@@ -96,10 +91,14 @@ function main () {
deploy) deploy)
version=$(npx pkg-jq -r .version) version=$(npx pkg-jq -r .version)
majorVer=$(echo "$version" | cut -d. -f1)
minorVer=$(echo "$version" | cut -d. -f2)
tag="${majorVer}.${minorVer}"
deployVersion "$artifactImage" "$dockerImage" "$version" deployVersion "$artifactImage" "$dockerImage" "$tag"
deployOnbuild "$artifactImage" "$tag"
if npx --package @chatie/semver semver-is-prod "$VERSION"; then if npx --package @chatie/semver semver-is-prod "$version"; then
deployLatest "$artifactImage" "$dockerImage" deployLatest "$artifactImage" "$dockerImage"
deployOnbuild "$artifactImage" latest deployOnbuild "$artifactImage" latest
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册