fix linting
This commit is contained in:
parent
013e606e63
commit
3e5be9b82b
3 changed files with 21 additions and 9 deletions
2
build.py
2
build.py
|
@ -33,7 +33,7 @@ default_task = "dev"
|
||||||
name = "ddadevops"
|
name = "ddadevops"
|
||||||
MODULE = "not-used"
|
MODULE = "not-used"
|
||||||
PROJECT_ROOT_PATH = "."
|
PROJECT_ROOT_PATH = "."
|
||||||
version = "4.0.4-SNAPSHOT"
|
version = "4.0.6-dev"
|
||||||
summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud"
|
summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud"
|
||||||
description = __doc__
|
description = __doc__
|
||||||
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]
|
authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")]
|
||||||
|
|
|
@ -61,7 +61,8 @@ class BuildFile(Validateable):
|
||||||
version_line = re.search("\nversion = .*\n", self.content)
|
version_line = re.search("\nversion = .*\n", self.content)
|
||||||
version_line_group = version_line.group()
|
version_line_group = version_line.group()
|
||||||
version_string = re.search(
|
version_string = re.search(
|
||||||
"[0-9]*\\.[0-9]*\\.[0-9]*(-SNAPSHOT)?(-dev)?[0-9]*", version_line_group
|
"[0-9]*\\.[0-9]*\\.[0-9]*(-SNAPSHOT)?(-dev)?[0-9]*",
|
||||||
|
version_line_group,
|
||||||
)
|
)
|
||||||
version_str = version_string.group()
|
version_str = version_string.group()
|
||||||
case BuildFileType.JAVA_CLOJURE:
|
case BuildFileType.JAVA_CLOJURE:
|
||||||
|
|
|
@ -68,10 +68,13 @@ def test_sould_parse_and_set_js():
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
||||||
assert """{
|
assert (
|
||||||
|
"""{
|
||||||
"name": "c4k-jira",
|
"name": "c4k-jira",
|
||||||
"version": "2.0.0"
|
"version": "2.0.0"
|
||||||
}""" == sut.content
|
}"""
|
||||||
|
== sut.content
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_sould_parse_and_set_version_for_gradle():
|
def test_sould_parse_and_set_version_for_gradle():
|
||||||
|
@ -93,6 +96,7 @@ version = "1.1.5-SNAPSHOT"
|
||||||
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
||||||
assert '\nversion = "2.0.0"\n' == sut.content
|
assert '\nversion = "2.0.0"\n' == sut.content
|
||||||
|
|
||||||
|
|
||||||
def test_sould_parse_and_set_version_for_py():
|
def test_sould_parse_and_set_version_for_py():
|
||||||
sut = BuildFile(
|
sut = BuildFile(
|
||||||
Path("./build.py"),
|
Path("./build.py"),
|
||||||
|
@ -138,6 +142,7 @@ version = "1.1.5-SNAPSHOT"
|
||||||
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
||||||
assert '\nversion = "2.0.0"\n' == sut.content
|
assert '\nversion = "2.0.0"\n' == sut.content
|
||||||
|
|
||||||
|
|
||||||
def test_sould_parse_and_set_version_for_clj():
|
def test_sould_parse_and_set_version_for_clj():
|
||||||
sut = BuildFile(
|
sut = BuildFile(
|
||||||
Path("./project.clj"),
|
Path("./project.clj"),
|
||||||
|
@ -159,7 +164,10 @@ def test_sould_parse_and_set_version_for_clj():
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
||||||
assert '\n(defproject org.domaindrivenarchitecture/c4k-jira "2.0.0"\n :description "jira c4k-installation package"\n)\n' == sut.content
|
assert (
|
||||||
|
'\n(defproject org.domaindrivenarchitecture/c4k-jira "2.0.0"\n :description "jira c4k-installation package"\n)\n'
|
||||||
|
== sut.content
|
||||||
|
)
|
||||||
|
|
||||||
sut = BuildFile(
|
sut = BuildFile(
|
||||||
Path("./project.clj"),
|
Path("./project.clj"),
|
||||||
|
@ -170,4 +178,7 @@ def test_sould_parse_and_set_version_for_clj():
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
sut.set_version(Version.from_str("1.1.5-SNAPSHOT").create_major())
|
||||||
assert '\n(defproject org.domaindrivenarchitecture/c4k-jira "2.0.0"\n:dependencies [[org.clojure/clojure "1.11.0"]]\n)\n ' == sut.content
|
assert (
|
||||||
|
'\n(defproject org.domaindrivenarchitecture/c4k-jira "2.0.0"\n:dependencies [[org.clojure/clojure "1.11.0"]]\n)\n '
|
||||||
|
== sut.content
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue