PHPackages                             silverstripe/cow - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. silverstripe/cow

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

silverstripe/cow
================

Release Tool for SilverStripe

2.2.2(3y ago)649.3k8[13 issues](https://github.com/silverstripe/cow/issues)BSD-3-ClausePHPPHP &gt;=5.5CI passing

Since Aug 20Pushed 4mo ago6 watchersCompare

[ Source](https://github.com/silverstripe/cow)[ Packagist](https://packagist.org/packages/silverstripe/cow)[ RSS](/packages/silverstripe-cow/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (19)Used By (0)

Cow
===

[](#cow)

[![CI](https://github.com/silverstripe/cow/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/cow/actions/workflows/ci.yml)

The ineptly named tool which may one day supercede the older [build tools](https://github.com/silverstripe/silverstripe-buildtools).

[![moo](https://camo.githubusercontent.com/a1485c628df5de96308ebe82c6e5e6b9c43e01c178ec35930b115b12a2cdd547/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f38417358563437376c73364c532f67697068792e676966)](https://camo.githubusercontent.com/a1485c628df5de96308ebe82c6e5e6b9c43e01c178ec35930b115b12a2cdd547/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f38417358563437376c73364c532f67697068792e676966)

DEV\_MODE
---------

[](#dev_mode)

Enable DEV\_MODE by adding DEV\_MODE=1 to a .env file. This will prevent pushing to github.

Do not perform a release on a directory if you previously used DEV\_MODE on that directory because the steps will be out of order. Instead, delete the directory that had DEV\_MODE run on it and start the entire release again with DEV\_MODE disabled.

The .env file needs to be in the /cow directory, not the releases directory. E.g. if your cow directory is in ~/Releases/cow, then create the .env file as ~/Releases/cow/.env

Install
-------

[](#install)

Requires Docker.

*You do not need to know how Docker works*, but you need to have it [installed and running](https://www.docker.com/get-started).

For production purposes Cow should be run via the Docker-based scripts included in the `./docker/bin` folder, rather than via direct invocation on your machine. That ensures use of consistent versions of all 3rd party libraries and tools and is the only supported installation option.

Tested on `Linux` and `macOS`, but should work on Windows too (with either `Cygwin` or `WSL`).

When it's installed, to run Cow launch `./docker/bin/run` script. That will automatically download the latest released version of Cow docker image and launch it transparently in your terminal.

When publishing a release, use the `./docker/bin/release` script. This is similar to `run`, but runs an SSH-Agent and performs some extra checks.

At the time of writing this readme (2020-02-03) you will need a [GITHUB\_TOKEN (scopes: `repo` and `read:packages`)](https://github.com/settings/tokens/new?scopes=repo,read:packages).

Then you need to configure `composer` of your Cow distribution by running

```
./docker/bin/composer config -g github-oauth.github.com TOKEN
```

For more details on these and other available scripts, see [docker/README.md](./docker/README.md).

### Adding Cow to your $PATH (optional)

[](#adding-cow-to-your-path-optional)

If you want to run Cow globally, you can create a symlink to `docker/bin/release` in a folder that is included in your `$PATH`.

Here's an example (feel free to reuse any of your existing folders from yor $PATH)

```
mkdir -p ~/.local/bin;  # ensure existing ~/.local/bin
ln -s ./docker/bin/release ~/.local/bin/cow  # create symlink to the launcher and name it cow
echo 'export PATH=$PATH:~/.local/bin' >> ~/.bashrc  # add ~/.local/bin to the $PATH
```

After you reload your session (e.g. reopen the terminal) you may launch `cow` from anywhere on your system:

```
cd ./my-project;
cow moo
```

### Native

[](#native)

To run Cow without Docker, reference the `Dockerfile` for system requirements.

Extra setup
-----------

[](#extra-setup)

- When publishing to GitHub make sure you have `ssh-agent` running and your SSH keys loaded (run `ssh-add`)

Commands
--------

[](#commands)

Cow is a collection of different tools (steps) grouped by top level commands. It is helpful to think about not only the commands available but each of the steps each command contains.

It is normally recommended that you run with `-vvv` verbose flag so that errors can be viewed during release.

For example, this is what I would run to release `3.1.14-rc1`.

```
cow release 3.1.14-rc1 -vvv

```

And once I've checked that all is fine, and am 100% sure that this code is ready to go.

```
cow release:publish 3.1.14-rc1 -vvv

```

Release
-------

[](#release)

`cow release  ` will perform the first part of the release tasks.

- `` is mandatory and must be the exact tag name to release.
- `` will allow you to release a recipe other than 'silverstripe/installer'

This command has these options:

- `-vvv` to ensure all underlying commands are echoed
- `--directory ` to specify the folder to create or look for this project in. If you don't specify this, it will install to the path specified by `./release-` in the current directory.
- `--repository ` will allow a custom composer package url to be specified. E.g. `http://packages.cwp.govt.nz`Note: If you specify the repository during setup it will be re-used for subsquent commands unless the `.cow.repository` file is deleted.
- `--branching ` will specify a branching strategy. This allows these options:
    - `auto` - Default option, will branch to the minor version (e.g. 1.1) unless doing a non-stable tag (e.g. rc1)
    - `major` - Branch all repos to the major version (e.g. 1) unless already on a more-specific minor version.
    - `minor` - Branch all repos to the minor semver branch (e.g. 1.1)
    - `none` - Release from the current branch and do no branching.
- `--skip-tests` to skip tests
- `--skip-i18n` to skip updating localisations

`release` actually has several sub-commands which can be run independently. These are as below:

- `release:create` creates the project folder
- `release:plan` Initiates release planning tool to preview release dependency versions
- `release:branch` Will (if needed) branch all modules
- `release:translate` Updates translations and commits this to source control
- `release:test` Run unit tests
- `release:changelog` Just generates the changelog and commits this to source control.

Publishing releases
-------------------

[](#publishing-releases)

`cow release` will only build the release itself. Once all of the above steps are complete, it is necessary to take the finished release and push it out to the open source community. A second major command `cow release:publish`is necessary to perform the final steps. The format for this command is:

`cow release:publish `

This command has these options:

- `-vvv` to ensure all underlying commands are echoed
- `--directory ` to specify the folder to look for the project created in the prior step. As with above, it will be guessed if omitted. You can run this command in the `./release-` directory and omit this option.

The release process, as with the initial `cow release` command, will actually be composed of several sub-commands, each of which could be run separately.

- `release:tag` Add annotated tags to each module and pushes

After the push step, `release:publish` will automatically wait for this version to be available in packagist.org before continuing.

Creating changelogs
-------------------

[](#creating-changelogs)

`cow release:changelog` will create a changelog which is categorised into various sets of change types, e.g. enhancements, bug fixes, API changes and security fixes.

The changelog command takes the follow arguments and options:

- `version` The version you're releasing the project as
- `recipe` The recipe you're releasing
- `--include-other-changes` If provided, uncategorised commits will also be included in an "Other changes" section. Note that commits which match `ChangelogItem::isIgnored()` will still be excluded, e.g. merge commits.
- `--changelog--use-legacy-format` If provided, falls back to the old changelog format (used before Oct 2020)
- `--changelog--audit-mode` swaps changelog format to Audit Mode, which turns on `include-upgrade-only` flag and uses audit template for changelog logs generation (including every single change).

**Pro-tip:** Part of this command involves plan generation and/or confirmation, and you can provide the `--skip-fetch-tags` option to prevent Cow from re-fetching all tags from origin if you have already done this and only want to make a quick change.

### Changelog Templates

[](#changelog-templates)

You can specify a file to use as the template for generating fresh changelogs via the `changelog-template` configuration in `.cow.json`. This template can use [Twig](https://twig.symfony.com/doc/2.x/templates.html) syntax to inject relevant information:

- `{{ version }}` will inject the version that the changelog is being generated for (e.g. `1.2.3`)
- `{{ logs }}` will inject the commit logs with before/after delimiters, so they can be updated later without destroying any other changes to the contents.

GitHub API ratelimit
--------------------

[](#github-api-ratelimit)

Run `cow github:ratelimit` to check your current GitHub API rate limiting status

**Note:** All GitHub API commands require a `GITHUB_ACCESS_TOKEN` environment variable to be set before they can be used. It can be in the .env file (see [dev mode](#dev_mode)).

Schema
------

[](#schema)

The [cow schema file](cow.schema.json) is in the root of this project.

You can run `cow schema:validate` to check the `.cow.json` configuration file in your project or module to ensure it matches against the Cow schema.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~169 days

Recently: every ~406 days

Total

16

Last Release

1385d ago

Major Versions

0.1 → 1.0-alpha2015-10-06

1.x-dev → 2.0.02017-12-05

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/654636?v=4)[Aaron Carlino](/maintainers/unclecheese)[@unclecheese](https://github.com/unclecheese)

![](https://www.gravatar.com/avatar/b0cba8b534e20e6ab4fff555a97b237a18436ebca1446fc0b29c8a8b504038b9?d=identicon)[GuySartorelli](/maintainers/GuySartorelli)

![](https://avatars.githubusercontent.com/u/111025?v=4)[Ingo Schommer](/maintainers/chillu)[@chillu](https://github.com/chillu)

![](https://www.gravatar.com/avatar/a25bc04c5720a36869d5a39c6449dde7eb43e19b7c8e666d5f632d6a9ab440b1?d=identicon)[emteknetnz](/maintainers/emteknetnz)

![](https://www.gravatar.com/avatar/afbb3dcc9ef29c1a6eedd6addcae5fce9ab1271915a85a4c349301b71237368d?d=identicon)[silverstripe-machine01](/maintainers/silverstripe-machine01)

![](https://www.gravatar.com/avatar/be6648e60fbab6f70bfc34dd8c14259562d28a47510a934ea9c01fe98633f3c2?d=identicon)[sminnee](/maintainers/sminnee)

![](https://avatars.githubusercontent.com/u/1168676?v=4)[Maxime Rainville](/maintainers/maxime-rainville)[@maxime-rainville](https://github.com/maxime-rainville)

---

Top Contributors

[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (59 commits)")[![GuySartorelli](https://avatars.githubusercontent.com/u/36352093?v=4)](https://github.com/GuySartorelli "GuySartorelli (43 commits)")[![dhensby](https://avatars.githubusercontent.com/u/563596?v=4)](https://github.com/dhensby "dhensby (38 commits)")[![emteknetnz](https://avatars.githubusercontent.com/u/4809037?v=4)](https://github.com/emteknetnz "emteknetnz (34 commits)")[![dnsl48](https://avatars.githubusercontent.com/u/9313746?v=4)](https://github.com/dnsl48 "dnsl48 (29 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (12 commits)")[![ScopeyNZ](https://avatars.githubusercontent.com/u/3260989?v=4)](https://github.com/ScopeyNZ "ScopeyNZ (11 commits)")[![bergice](https://avatars.githubusercontent.com/u/541886?v=4)](https://github.com/bergice "bergice (8 commits)")[![lozcalver](https://avatars.githubusercontent.com/u/1655548?v=4)](https://github.com/lozcalver "lozcalver (6 commits)")[![NightJar](https://avatars.githubusercontent.com/u/778003?v=4)](https://github.com/NightJar "NightJar (4 commits)")[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (2 commits)")[![flamerohr](https://avatars.githubusercontent.com/u/1064889?v=4)](https://github.com/flamerohr "flamerohr (1 commits)")[![patricknelson](https://avatars.githubusercontent.com/u/4269377?v=4)](https://github.com/patricknelson "patricknelson (1 commits)")[![maxime-rainville](https://avatars.githubusercontent.com/u/1168676?v=4)](https://github.com/maxime-rainville "maxime-rainville (1 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/silverstripe-cow/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripe-cow/health.svg)](https://phpackages.com/packages/silverstripe-cow)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19562.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
