Skip to content

Commit

Permalink
Add documentation and tests for allowDirtyBuild
Browse files Browse the repository at this point in the history
  • Loading branch information
webbertakken committed May 21, 2020
1 parent 8c177b1 commit 02ff5bb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions src/model/versioning.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 02ff5bb

Please sign in to comment.