定制 elvanto/tapegun 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elvanto/tapegun

最新稳定版本:v3.0.0

Composer 安装命令:

composer create-project elvanto/tapegun

包简介

README 文档

README

A simple build system written in PHP.

Features:

  • Support for tasks written as shell commands or PHP classes
  • Multi-target builds with separate environments
  • Bundled tasks for Git, archiving and templated text files

Installation

The preferred installation method is composer;

composer require-dev elvanto/tapegun

Usage

Tapegun is configured through a JSON file that defines the environment, targets and tasks required to build a project. The basic structure is as follows.

{
  "name": "project-name",
  "env": {
      "foo": "bar",
      "staging": "/var/app/staging"
  },
  "targets": [
    {
      "name": "dev",
      "env": {
        "foo": "baz"
      }
    },
    {
      "name": "prod",
      "env": {
        "foo": "qux"
      }
    }
  ],
  "pre": [
    {
      "class": "Tapegun.Task.GitClone",
      "env": {
        "git:source": "https://github.com/company/project-name",
        "git:target": "{{staging}}"
      }
    }
  ],
  "build": [
    {
      "description": "Deploying project",
      "command": "project-deploy --foo={{foo}}"
    }
  ],
  "post": [
    {
      "description": "Cleaning staging directory",
      "command": "rm -rf /var/app/staging"
    }
  ]
}

Configuration

Key Description
name The project name.
env An object mapping environment variable names to values, which can be any data type support by JSON.
targets An array of objects defining build targets. Each task defined under build will be run once per target and inherit env from both the root and target configurations.
pre An array of tasks to be run once at the beginning of the build. See build for more details.
post An array of tasks to be run once at the end of the build. See build for more details.
build An array of tasks to be run once per build target.

The command property is used to execute a shell command. Environment variables surrounded by {{ and }} will be replaced with their corresponding values. A custom description can be provided through the description property. If async is set to true, the task will run asynchronously for all targets.

The class property is used to execute a task written in PHP. The namespace must be provided, with . used as a delimiter.

Environments

Environment variables may be specified on the task, target or root level and will be resolved in this order.

License

MIT License

统计信息

  • 总下载量: 3.64k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-03-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固