diff --git a/etc/api/api.yaml b/etc/api/api.yaml new file mode 100644 index 0000000000..dd63668500 --- /dev/null +++ b/etc/api/api.yaml @@ -0,0 +1,29 @@ +api: + base_path: "etc/api" + terms: + # how to actually do something with the API + action: doit + # when a resource is supposed to be uploaded + upload_action: upload + properties: + # additional fields specified by the user + params: '_additional_params' + # custom scopes for authentication + scopes: '_scopes' +make: + target_suffix: + depends_on: + templates: + # all output directories are relative to the one set for the respective API + - source: README.md + - source: LICENSE.md + - source: ../Cargo.toml + - source: lib.rs + output_dir: src +cargo: + build_version: "0.1.1" + keywords: [protocol, web, api] + dependencies: + - url = "*" + - serde = "*" + - serde_macros = "*" diff --git a/etc/api/cli.yaml b/etc/api/cli.yaml new file mode 100644 index 0000000000..f5c150d027 --- /dev/null +++ b/etc/api/cli.yaml @@ -0,0 +1,9 @@ +make: + target_suffix: cli + depends_on: api + templates: + - source: main.rs + output_dir: src +cargo: + build_version: "0.0.1" + keywords: [cli] diff --git a/etc/api/shared.yaml b/etc/api/shared.yaml index 8d6beed01a..83f67850bd 100644 --- a/etc/api/shared.yaml +++ b/etc/api/shared.yaml @@ -8,25 +8,6 @@ directories: api_base: etc/api # all mako source files mako_src: src/mako -api: - base_path: "etc/api" - terms: - # how to actually do something with the API - action: doit - # when a resource is supposed to be uploaded - upload_action: upload - properties: - # additional fields specified by the user - params: '_additional_params' - # custom scopes for authentication - scopes: '_scopes' - templates: - # all output directories are relative to the one set for the respective API - - source: README.md - - source: LICENSE.md - - source: Cargo.toml - - source: lib.rs - output_dir: src cargo: build_version: "0.1.1" repo_base_url: https://github.com/Byron/google-apis-rs @@ -34,7 +15,7 @@ cargo: authors: # don't forget to possibly add them to copyright authors - Sebastian Thiel - keywords: [google, protocol, web, api] + keywords: [google] # All APIs should live in the same repository repository_url: https://github.com/Byron/google-apis-rs urls: diff --git a/src/mako/Cargo.toml.mako b/src/mako/Cargo.toml.mako index 47a090b128..6a01ad7a3f 100644 --- a/src/mako/Cargo.toml.mako +++ b/src/mako/Cargo.toml.mako @@ -18,7 +18,7 @@ keywords = ["${name}", ${", ".join(estr(cargo.keywords))}] [dependencies] hyper = "*" mime = "*" -url = "*" -serde = "*" -serde_macros = "*" yup-oauth2 = "*" +% for dep in cargo.dependencies: +${dep} +% endfor diff --git a/src/mako/README.md.mako b/src/mako/api/README.md.mako similarity index 100% rename from src/mako/README.md.mako rename to src/mako/api/README.md.mako diff --git a/src/mako/lib.rs.mako b/src/mako/api/lib.rs.mako similarity index 100% rename from src/mako/lib.rs.mako rename to src/mako/api/lib.rs.mako diff --git a/src/mako/lib/lib.mako b/src/mako/api/lib/lib.mako similarity index 100% rename from src/mako/lib/lib.mako rename to src/mako/api/lib/lib.mako diff --git a/src/mako/lib/mbuild.mako b/src/mako/api/lib/mbuild.mako similarity index 100% rename from src/mako/lib/mbuild.mako rename to src/mako/api/lib/mbuild.mako diff --git a/src/mako/lib/rbuild.mako b/src/mako/api/lib/rbuild.mako similarity index 100% rename from src/mako/lib/rbuild.mako rename to src/mako/api/lib/rbuild.mako diff --git a/src/mako/lib/schema.mako b/src/mako/api/lib/schema.mako similarity index 100% rename from src/mako/lib/schema.mako rename to src/mako/api/lib/schema.mako diff --git a/src/mako/cli/main.rs.mako b/src/mako/cli/main.rs.mako new file mode 100644 index 0000000000..d67064b546 --- /dev/null +++ b/src/mako/cli/main.rs.mako @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, World !"); +} \ No newline at end of file