1.0.5 • Published 7 years ago

shark-deploy v1.0.5

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

发布代码到指定的代码仓库

使用方式

# target: 一个项目在不同阶段,可能对应着不同的代码仓库。比如测试库和线上库。target的作用就是来区分不同的代码仓库
# branch: 待发布的代码分支
# sharkdeploy: sharkdeploy所需要的配置文件路径(如果是相对路径,则相对于进程当前工作目录)。默认取进程当前工作目录下的shark-deploy.js
# tagv: tag 标识.required 当需要打tag的时候
# tagm: tag 说明.option 默认 new version
shark deploy <target> <branch> [--sharkdeploy <sharkdeploy>] [--tagv <tagv>] [--tagm <tagm>]

shark-deploy.js 配置文件

//test与online,对应使用方式中两种不同的代码仓库。所以上述target只能取其中的一个值。
{
    "sourcedir": "request.待发布代码的目录,如果是相对路径,则相对于该配置文件",
    "test": {
        "repodir": "request.与测试仓库有对应关系的目录。绝对路径",
        "repo": "request.测试仓库地址"
    },
    "online": {
        "repodir": "request.与线上仓库有对应关系的目录。绝对路径",
        "repo": "request.线上仓库地址"
    }
    //如果还对应着另外的仓库
    ...
}

例子

  • 工作目录 /usr/usrname/worktree
  • 配置文件 /usr/usrname/worktree/config.js
  • 待发布代码的目录 /usr/usrname/worktree/source
  • 与测试仓库有映射关系的目录 /usr/usrname/deploy
  • 测试repo地址 git@github.com
  • branch test
  • tagv v1.0.0
  • tagm 'test tag'
//config.js
{
    "sourcedir": "source",
    "test": {
        "repodir": "/usr/usrname/deploy",
        "repo": "git@github.com"
    }
}
cd /usr/usrname/worktree

# 配置文件的方式
shark deploy test test --sharkdeploy config.js --tagv v1.0.0 --tagm 'test tag'
1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago