Add documentation and tests for allowDirtyBuild

This commit is contained in:
Webber 2020-05-21 15:02:15 +02:00 committed by Webber Takken
parent 8c177b1bad
commit 02ff5bbef2
2 changed files with 24 additions and 0 deletions

View File

@ -324,6 +324,20 @@ Allows specifying a custom version in the `version` field.
If there is a use case missing from Builder, feel free to create a feature request.
#### allowDirtyBuild
Allows the branch of the build to be dirty, and still generate the build.
```yaml
- uses: webbertakken/unity-builder@<version>
with:
allowDirtyBuild: true
```
Note that it is generally bad practice to modify your branch
in a CI Pipeline. However there are exceptions where this might
be needed. (use with care).
#### customParameters
Custom parameters to configure the build.

View File

@ -90,6 +90,16 @@ describe('Versioning', () => {
});
});
describe('isDirtyAllowed', () => {
it('does not throw', () => {
expect(() => Versioning.isDirtyAllowed).not.toThrow();
});
it('returns false by default', () => {
expect(Versioning.isDirtyAllowed).toStrictEqual(false);
});
});
describe('descriptionRegex', () => {
it('is a valid regex', () => {
expect(Versioning.descriptionRegex).toBeInstanceOf(RegExp);