-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add ability for the current version to be generated from the gi…
…t sha
- Loading branch information
1 parent
d883140
commit dd70365
Showing
40 changed files
with
502 additions
and
109 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/case-core/src/connectors/BuildEnvironment/BuildEnvironment.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { EMPTY_DATA_CONTEXT } from '../../__tests__/testContext'; | ||
import { makeEnvironment } from './BuildEnvironment'; | ||
|
||
describe('build environment', () => { | ||
const buildEnvironment = makeEnvironment(); | ||
|
||
describe('version', () => { | ||
describe('with defaults', () => { | ||
it('starts with a semver tag (this repository always will)', () => { | ||
expect(buildEnvironment.version(EMPTY_DATA_CONTEXT)).toMatch( | ||
/^\d+\.\d+\.\d+/, | ||
); | ||
}); | ||
}); | ||
|
||
describe('with GIT_SHA', () => { | ||
it('should be the right length for a full git sha', () => { | ||
expect( | ||
buildEnvironment.version({ | ||
...EMPTY_DATA_CONTEXT, | ||
'_case:currentRun:context:autoVersionFrom': 'GIT_SHA', | ||
}), | ||
).toHaveLength(40); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.