Skip to content

Commit 5e28a06

Browse files
committed
fix(versions): cli + api use a single base version
That way we get rid of the duplication at least. Probably it would be enough to just refer to version 1 of the library respectively, and let semver do the rest.
1 parent cc30a2e commit 5e28a06

4 files changed

Lines changed: 2 additions & 11 deletions

File tree

etc/api/shared.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,8 @@ directories:
6565
mako_src: src/mako
6666
# The subdirectory to contain documentation from all APIs and related programs
6767
doc_subdir: doc
68-
# This somewhat intricate setup allows the CLI to access certain cargo-API values,
69-
# without having us duplicate them.
70-
cargo_api: &cargo_api
71-
build_version: "1.0.0"
7268
cargo:
73-
# This means that the API must not specify the shared variables from cargo_api
74-
# anymore
75-
<<: *cargo_api
69+
build_version: "1.0.0"
7670
repo_base_url: https://github.com/Byron/google-apis-rs
7771
authors:
7872
# don't forget to possibly add them to copyright authors

etc/api/type-api.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ make:
2525
- source: build.rs
2626
output_dir: src
2727
cargo:
28-
build_version: "1.0.0"
2928
build_script: src/build.rs
3029
keywords: [protocol, web, api]
3130
doc_base_url: https://docs.rs

etc/api/type-cli.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ make:
2323
- source: main.rs
2424
output_dir: src
2525
cargo:
26-
build_version: "1.0.0"
2726
keywords: [cli]
2827
is_executable: YES
2928
doc_base_url: http://byron.github.io/google-apis-rs

src/mako/Cargo.toml.mako

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ ${dep}
4848
4949
if make.depends_on_suffix is not None:
5050
crate_name_we_depend_on = library_to_crate_name(api_name, suffix=make.depends_on_suffix)
51-
depends_on_key = 'cargo_' + make.depends_on_id
52-
crate_version_we_depend_on = self.context.get(depends_on_key).get('build_version')
51+
crate_version_we_depend_on = cargo.build_version
5352
nightly_features.append(crate_name_we_depend_on + '/nightly')
5453
default_features.append(crate_name_we_depend_on + '/with-serde-codegen')
5554
%>\

0 commit comments

Comments
 (0)