This commit is contained in:
@@ -873,6 +873,7 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
AbstractType get = f.ybean("SemverGetParams");
|
||||
addProp(get, "bump", f.yenum("SemverBump", "major", "minor", "patch", "final"));
|
||||
addProp(get, "pre", t_ne_string);
|
||||
addProp(get, "pre_without_version", t_boolean);
|
||||
|
||||
AbstractType put = f.ybean("SemverPutParams");
|
||||
for (YTypedProperty p : get.getProperties()) {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
*Optional.* By default `false`, once it's set to `true`
|
||||
then PreRelease will be bumped without a version number.
|
||||
@@ -3715,6 +3715,35 @@ public class ConcourseEditorTest {
|
||||
editor.assertHoverContains("openstack", "All openstack configuration");
|
||||
}
|
||||
|
||||
@Test public void GH_849_build_without_version() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"resources:\n" +
|
||||
"- name: test\n" +
|
||||
" type: semver\n" +
|
||||
" source:\n" +
|
||||
" driver: git\n" +
|
||||
" uri: some-git-url\n" +
|
||||
" branch: main\n" +
|
||||
" file: VERSION\n" +
|
||||
"jobs:\n" +
|
||||
"- name: test\n" +
|
||||
" plan:\n" +
|
||||
" - get: test\n" +
|
||||
" params:\n" +
|
||||
" pre_without_version: not-a-bool\n" +
|
||||
" - put: test\n" +
|
||||
" params:\n" +
|
||||
" pre_without_version: not-b-bool\n"
|
||||
);
|
||||
editor.assertProblems(
|
||||
"not-a-bool|boolean",
|
||||
"not-b-bool|boolean"
|
||||
);
|
||||
|
||||
editor.assertHoverContains("pre_without_version", 1, "PreRelease will be bumped");
|
||||
editor.assertHoverContains("pre_without_version", 2, "PreRelease will be bumped");
|
||||
}
|
||||
|
||||
@Test public void semverResourceGetParamsReconcileAndHovers() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"resources:\n" +
|
||||
|
||||
Reference in New Issue
Block a user