2017 © Pedro Peláez
 

project release-tools

Release Tools for projects

image

daltcore/release-tools

Release Tools for projects

  • Tuesday, October 3, 2017
  • by RamonSmit
  • Repository
  • 1 Watchers
  • 0 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 19 Versions
  • 0 % Grown

The README.md

Release tools for Projects

FOSSA Status, (*1)

Installation

Via composer:, (*2)

composer global require daltcore/release-tools

or
Via executable: Go to releases and add this executable to your $PATH environment., (*3)

Initialize ReleaseTools on current running repo. Creates .release-tools directory and .release-tool file., (*4)

release-tool init

Check if ReleaseTools is ready for use, (*5)

release-tool status

If you want to know more about thestructure behind ReleaseTools
then you can use the -v flag behind every command to see the
verbose info
, (*6)

_If a error occurs then you can add the -vvv parameter to the tool. A stack-trace will be shown., (*7)

Usage

Development

In development you should make a new branch for all your features/changes.
Release tools makes use of the current branch name for file naming for the changelog files., (*8)

Adding a new changelog file to the repo, this command is interactive.
For testing you can use --dry-run as parameter, (*9)

release-tool changelog 

Implement git hook to force you to make a changelog entry, (*10)

release-tool hooks:made-changelog

Releasing

In development you want to run the prepare command which will create a issue in the repo that is specified in the .release-tools file
For testing you can use --dry-run as parameter, (*11)

release-tool release:prepare

Building changelog file
For testing you can use --dry-run as parameter, (*12)

release-tool build:changelog

List all pending changelogs, (*13)

release-tool list:changelog

```text +-------------------+------------+---------------+--------------+ | Title | Author | Merge Request | Type | +-------------------+------------+---------------+--------------+ | this is a test MR | Ramon Smit | 1 | Security fix | +-------------------+------------+---------------+--------------+, (*14)


#### Building a stub: If you need to create a custom stub for `release-tool prepare` you can create a file called `prepare.stub` in the directory `.release-tools/stubs` These files are markdown files and the following variables are available: - :version This represents the version you fill when askes - :reop This represents the `repo` variable from the `.release-tool` file This wil override as the issue template pushed to GitLab when releasing. Example: ```markdown **Release `:repo` version `:version`** *Pre flight checks* * [ ] - Notify in `5_Releases` * [ ] - A * [ ] - B * [ ] - C

Building playbooks:

If you need to create a custom playbook for release-tool playbook <playbook-name> you can
create a file called <name>.rtp in the directory .release-tools/playbooks, (*15)

These files are yaml files and the following variables are available: - :version This represents the version you fill when askes - :reop This represents the repo variable from the .release-tool file, (*16)

Example:, (*17)

playbook:
  gitlab:
    make_branch:
      from: develop
      to: releases/:version

    tag:
      from: releases/:version
      version: v:version

    merge_request:
      branches: releases/:version > master

    merge_request:
      branches: master > develop

  mattermost:
    notify:
      channel: 'releases'
      message: '@channel We''re about to release version :version of the project :repo. Please stop merging now into develop until next announcement'

The example contains all available methods for playbooks., (*18)

.release-tools file example

repo: group/repo
api_url: https://gitlab.com
api_key: AbC123DeF456Ghi789
mattermost_webhook: https://mattermost.server.com/hooks/hook-uri

License

FOSSA Status, (*19)

The Versions