From 3661e47bfff794ca4b6de063775da9cf67dbc00d Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 16 Feb 2023 14:21:27 +0100 Subject: [PATCH] WIP create ReleaseMixin --- .gitignore | 5 ++- build.py | 2 +- release_mixin.py | 45 +++++++++++++++++++ ...core.classpath.extract-native-dependencies | 1 + devops_test.py => version.py | 0 5 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 release_mixin.py create mode 100644 target/default+test/stale/leiningen.core.classpath.extract-native-dependencies rename devops_test.py => version.py (100%) diff --git a/.gitignore b/.gitignore index a9c5fbc..7f3a111 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,7 @@ # Go workspace file go.work -__pycache__ \ No newline at end of file +__pycache__ + +.clj-kondo/ +.lsp/ \ No newline at end of file diff --git a/build.py b/build.py index 3efe26d..183e28e 100644 --- a/build.py +++ b/build.py @@ -1,6 +1,6 @@ from pybuilder.core import task, init from ddadevops import * -from devops_test import * +from version import * def main(): diff --git a/release_mixin.py b/release_mixin.py new file mode 100644 index 0000000..6d709f7 --- /dev/null +++ b/release_mixin.py @@ -0,0 +1,45 @@ + +from ddadevops import DevopsBuild +from ddadevops import execute +from ddadevops import gopass_field_from_path, gopass_password_from_path +from version import Version + + +def add_release_mixin_config(config, release_type, commit, file): + config.update({'ReleaseMixin': + {'release_type': release_type, + 'commit': commit, + 'file': file}}) + return config + + +class ReleaseMixin(DevopsBuild): + + def __init__(self, project, config): + super().__init__(project, config) + release_mixin_config = config['ReleaseMixin'] + self.release_type = release_mixin_config['release_type4'] + self.commit = release_mixin_config['commit'] + self.file = release_mixin_config['file'] + + def read_commit_message(self): + pass + + def calculate_release_type(self): + pass + + def get_version(self): + + return Version.from_file(self.file) + + def create_release_version(self): + pass + + def create_bump_version(self): + pass + + + + + + diff --git a/target/default+test/stale/leiningen.core.classpath.extract-native-dependencies b/target/default+test/stale/leiningen.core.classpath.extract-native-dependencies new file mode 100644 index 0000000..03ba243 --- /dev/null +++ b/target/default+test/stale/leiningen.core.classpath.extract-native-dependencies @@ -0,0 +1 @@ +[{:dependencies {args4j {:vsn "2.0.26", :native-prefix nil}, org.clojure/data.json {:vsn "0.2.6", :native-prefix nil}, org.clojure/clojure {:vsn "1.11.1", :native-prefix nil}, org.clojure/core.specs.alpha {:vsn "0.2.62", :native-prefix nil}, org.clojure/spec.alpha {:vsn "0.3.218", :native-prefix nil}, dda/data-test {:vsn "0.1.1", :native-prefix nil}, quoin {:vsn "0.1.2", :native-prefix nil}, org.domaindrivenarchitecture/c4k-common-clj {:vsn "5.0.1", :native-prefix nil}, hickory {:vsn "0.7.1", :native-prefix nil}, org.clojure/google-closure-library {:vsn "0.0-20160609-f42b4a24", :native-prefix nil}, org.clojure/clojurescript {:vsn "1.9.293", :native-prefix nil}, aero {:vsn "1.1.6", :native-prefix nil}, orchestra {:vsn "2021.01.01-1", :native-prefix nil}, org.flatland/ordered {:vsn "1.5.9", :native-prefix nil}, com.google.jsinterop/jsinterop-annotations {:vsn "1.0.0", :native-prefix nil}, org.yaml/snakeyaml {:vsn "1.33", :native-prefix nil}, org.mozilla/rhino {:vsn "1.7R5", :native-prefix nil}, org.clojure/google-closure-library-third-party {:vsn "0.0-20160609-f42b4a24", :native-prefix nil}, pjstadig/humane-test-output {:vsn "0.11.0", :native-prefix nil}, com.google.javascript/closure-compiler-externs {:vsn "v20160911", :native-prefix nil}, clojure-complete {:vsn "0.2.5", :native-prefix nil}, com.google.guava/guava {:vsn "19.0", :native-prefix nil}, viebel/codox-klipse-theme {:vsn "0.0.1", :native-prefix nil}, clj-commons/clj-yaml {:vsn "1.0.26", :native-prefix nil}, prismatic/schema {:vsn "1.1.10", :native-prefix nil}, org.clojure/tools.reader {:vsn "1.3.6", :native-prefix nil}, nrepl {:vsn "0.6.0", :native-prefix nil}, org.jsoup/jsoup {:vsn "1.9.2", :native-prefix nil}, expound {:vsn "0.9.0", :native-prefix nil}, com.google.javascript/closure-compiler-unshaded {:vsn "v20160911", :native-prefix nil}, com.google.protobuf/protobuf-java {:vsn "2.5.0", :native-prefix nil}, com.google.code.findbugs/jsr305 {:vsn "1.3.9", :native-prefix nil}, com.google.code.gson/gson {:vsn "2.2.4", :native-prefix nil}}, :native-path "target/default+test/native"} {:native-path "target/default+test/native", :dependencies {args4j {:vsn "2.0.26", :native-prefix nil, :native? false}, org.clojure/data.json {:vsn "0.2.6", :native-prefix nil, :native? false}, org.clojure/clojure {:vsn "1.11.1", :native-prefix nil, :native? false}, org.clojure/core.specs.alpha {:vsn "0.2.62", :native-prefix nil, :native? false}, org.clojure/spec.alpha {:vsn "0.3.218", :native-prefix nil, :native? false}, dda/data-test {:vsn "0.1.1", :native-prefix nil, :native? false}, quoin {:vsn "0.1.2", :native-prefix nil, :native? false}, org.domaindrivenarchitecture/c4k-common-clj {:vsn "5.0.1", :native-prefix nil, :native? false}, hickory {:vsn "0.7.1", :native-prefix nil, :native? false}, org.clojure/google-closure-library {:vsn "0.0-20160609-f42b4a24", :native-prefix nil, :native? false}, org.clojure/clojurescript {:vsn "1.9.293", :native-prefix nil, :native? false}, aero {:vsn "1.1.6", :native-prefix nil, :native? false}, orchestra {:vsn "2021.01.01-1", :native-prefix nil, :native? false}, org.flatland/ordered {:vsn "1.5.9", :native-prefix nil, :native? false}, com.google.jsinterop/jsinterop-annotations {:vsn "1.0.0", :native-prefix nil, :native? false}, org.yaml/snakeyaml {:vsn "1.33", :native-prefix nil, :native? false}, org.mozilla/rhino {:vsn "1.7R5", :native-prefix nil, :native? false}, org.clojure/google-closure-library-third-party {:vsn "0.0-20160609-f42b4a24", :native-prefix nil, :native? false}, pjstadig/humane-test-output {:vsn "0.11.0", :native-prefix nil, :native? false}, com.google.javascript/closure-compiler-externs {:vsn "v20160911", :native-prefix nil, :native? false}, clojure-complete {:vsn "0.2.5", :native-prefix nil, :native? false}, com.google.guava/guava {:vsn "19.0", :native-prefix nil, :native? false}, viebel/codox-klipse-theme {:vsn "0.0.1", :native-prefix nil, :native? false}, clj-commons/clj-yaml {:vsn "1.0.26", :native-prefix nil, :native? false}, prismatic/schema {:vsn "1.1.10", :native-prefix nil, :native? false}, org.clojure/tools.reader {:vsn "1.3.6", :native-prefix nil, :native? false}, nrepl {:vsn "0.6.0", :native-prefix nil, :native? false}, org.jsoup/jsoup {:vsn "1.9.2", :native-prefix nil, :native? false}, expound {:vsn "0.9.0", :native-prefix nil, :native? false}, com.google.javascript/closure-compiler-unshaded {:vsn "v20160911", :native-prefix nil, :native? false}, com.google.protobuf/protobuf-java {:vsn "2.5.0", :native-prefix nil, :native? false}, com.google.code.findbugs/jsr305 {:vsn "1.3.9", :native-prefix nil, :native? false}, com.google.code.gson/gson {:vsn "2.2.4", :native-prefix nil, :native? false}}}] \ No newline at end of file diff --git a/devops_test.py b/version.py similarity index 100% rename from devops_test.py rename to version.py