diff --git a/build.sh b/build.sh index e2e933f0..80921528 100644 --- a/build.sh +++ b/build.sh @@ -1,8 +1,37 @@ -docker build -t mafgwo/stackedit . -docker tag mafgwo/stackedit mafgwo/stackedit:$1 . -docker tag mafgwo/stackedit registry.cn-hangzhou.aliyuncs.com/mafgwo/stackedit -docker tag mafgwo/stackedit registry.cn-hangzhou.aliyuncs.com/mafgwo/stackedit:$1 -docker push mafgwo/stackedit -docker push registry.cn-hangzhou.aliyuncs.com/mafgwo/stackedit -docker push mafgwo/stackedit:$1 -docker push registry.cn-hangzhou.aliyuncs.com/mafgwo/stackedit:$1 \ No newline at end of file +#!/bin/bash + +# 检查参数是否提供版本号 +if [ -z "$1" ]; then + echo "请提供版本号作为参数" + exit 1 +fi + +# 定义版本号变量 +VERSION="$1" +IMAGE_NAME="mafgwo/stackedit" + +# 构建 Docker 镜像 +build_image() { + docker build -t "$IMAGE_NAME" . +} + +# 标记 Docker 镜像 +tag_image() { + docker tag "$IMAGE_NAME" "$IMAGE_NAME:$VERSION" + docker tag "$IMAGE_NAME" "registry.cn-hangzhou.aliyuncs.com/$IMAGE_NAME:$VERSION" +} + +# 推送 Docker 镜像 +push_image() { + docker push "$IMAGE_NAME" + docker push "registry.cn-hangzhou.aliyuncs.com/$IMAGE_NAME" + docker push "$IMAGE_NAME:$VERSION" + docker push "registry.cn-hangzhou.aliyuncs.com/$IMAGE_NAME:$VERSION" +} + +# 执行构建、标记和推送 +build_image +tag_image +push_image + +echo "操作完成" \ No newline at end of file diff --git a/src/components/modals/CommitMessageModal.vue b/src/components/modals/CommitMessageModal.vue index 382666f2..0159bce2 100644 --- a/src/components/modals/CommitMessageModal.vue +++ b/src/components/modals/CommitMessageModal.vue @@ -2,9 +2,12 @@

自定义 {{ config.name }} 提交信息。