From 94f814dd11665dcfd050cdc802e4de227cb1ab09 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 9 Aug 2022 13:23:30 +0200 Subject: [PATCH] Added base files --- .gitignore | 1 + Cargo.lock | 11 +++++++++++ Cargo.toml | 5 +++++ cuddle_cli/Cargo.toml | 8 ++++++++ cuddle_cli/src/main.rs | 3 +++ examples/base/Cargo.toml | 8 ++++++++ examples/base/cuddle.yaml | 3 +++ examples/base/src/main.rs | 3 +++ schemas/base.json | 25 +++++++++++++++++++++++++ 9 files changed, 67 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 cuddle_cli/Cargo.toml create mode 100644 cuddle_cli/src/main.rs create mode 100644 examples/base/Cargo.toml create mode 100644 examples/base/cuddle.yaml create mode 100644 examples/base/src/main.rs create mode 100644 schemas/base.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..6960c60 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,11 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "base" +version = "0.1.0" + +[[package]] +name = "cuddle_cli" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..2413e39 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,5 @@ +[workspace] +members = [ +"cuddle_cli", +"examples/base" +] diff --git a/cuddle_cli/Cargo.toml b/cuddle_cli/Cargo.toml new file mode 100644 index 0000000..564cd03 --- /dev/null +++ b/cuddle_cli/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "cuddle_cli" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/cuddle_cli/src/main.rs b/cuddle_cli/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/cuddle_cli/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/examples/base/Cargo.toml b/examples/base/Cargo.toml new file mode 100644 index 0000000..6916ddc --- /dev/null +++ b/examples/base/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "base" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/examples/base/cuddle.yaml b/examples/base/cuddle.yaml new file mode 100644 index 0000000..eda4a66 --- /dev/null +++ b/examples/base/cuddle.yaml @@ -0,0 +1,3 @@ +# yaml-language-server: $schema=../../schemas/base.json + +base: "git@git.front.kjuulh.io:kjuulh/cuddle-base.git" diff --git a/examples/base/src/main.rs b/examples/base/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/examples/base/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/schemas/base.json b/schemas/base.json new file mode 100644 index 0000000..69c9137 --- /dev/null +++ b/schemas/base.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "base": { + "title": "Base url from which to base current cuddle plan on", + "description": "Base url from which to construct current cuddle plan, is recursive", + "oneOf": [ + { + "type": "string", + "title": "The url of the parameter" + }, + { + "type": "boolean", + "title": "Whether it is enabled or not", + } + ] + } + }, + "required": [ + "base" + ], + "type": "object", + "title": "Cuddle base schema" +}