0.1.8 • Published 1 month ago

@wx-sab/drone-deploy-plugin v0.1.8

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

@wx-sab/drone-deploy-plugin

前端项目发布插件

Features

x 自动创建版本 x 自动发布对应环境

使用

安装

pnpm add -D @wx-sab/drone-deploy-plugin

配置

自动读取 sab-deploy.config.ts 或者 sab-deploy.config.js 文件的配置

import { defineConfig } from '@wx-sab/drone-deploy-plugin'

export default defineConfig({
  // 开发平台对应的项目名
  projectName: string;
  // 开发平台对应的应用名,默认取 package.json 的 name
  appName: string;
  // 需要自动发布的环境 Map, 分支 -> 环境
  /** 如下:
   * {
   * dev: "dp-dev",
   * qa: "dp-qa",
   * release: "dp-pre"
   * }
   */
  autoReleaseEnvs: Record<string, string>;
  // 发布的版本号,默认取 package.json的 version
  version: string;
  // 是否自动创建版本
  autoCreateVersion: boolean;
  // 当前的分支
  branch: string;

  // 开发平台的账号密码
  accountId: string;
  password: string;
})

指令

校验版本

  npx sab-deploy version-check --branch ${DRONE_BRANCH}

发布版本

  npx sab-deploy release --branch ${DRONE_BRANCH}
0.1.8

1 month ago

0.1.7

1 month ago

0.1.6

5 months ago

0.1.5

5 months ago

0.1.4

5 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.1.0

5 months ago