mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-07 03:56:42 +01:00
feat(cli): can now be published
This works as the API version is now explicitly specified, allowing cargo-publish to work as usual.
This commit is contained in:
@@ -41,12 +41,15 @@ ${dep}
|
||||
<%
|
||||
api_name = util.library_name()
|
||||
crate_name_we_depend_on = None
|
||||
crate_version_we_depend_on = None
|
||||
|
||||
nightly_features = ["serde_macros", "yup-oauth2/nightly"]
|
||||
default_features = ["serde_codegen", "yup-oauth2/with-serde-codegen"]
|
||||
|
||||
if make.depends_on_suffix is not None:
|
||||
crate_name_we_depend_on = library_to_crate_name(api_name, suffix=make.depends_on_suffix)
|
||||
depends_on_key = 'cargo_' + make.depends_on_id
|
||||
crate_version_we_depend_on = self.context.get(depends_on_key).get('build_version')
|
||||
nightly_features.append(crate_name_we_depend_on + '/nightly')
|
||||
default_features.append(crate_name_we_depend_on + '/with-serde-codegen')
|
||||
%>\
|
||||
@@ -61,7 +64,7 @@ serde_codegen = { version = "^ 0.8", optional = true }
|
||||
|
||||
[dependencies.${crate_name_we_depend_on}]
|
||||
path = "../${api_name}"
|
||||
version = "*"
|
||||
version = "${crate_version_we_depend_on}"
|
||||
optional = true
|
||||
default-features = false
|
||||
% endif
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
i.get('output_dir', '') + '/' + i.source.strip('../')) for i in make.templates]
|
||||
api_json = directories.api_base + '/' + an + '/' + version + '/' + an + '-api.json'
|
||||
api_meta_dir = os.path.dirname(api_json)
|
||||
print api_json
|
||||
api_crate_publish_file = api_meta_dir + '/crates/' + util.crate_version(cargo.build_version +
|
||||
make.aggregated_target_suffix, json.load(open(api_json, 'r')).get('revision', '00000000'))
|
||||
api_json_overrides = api_meta_dir + '/' + an + '-api_overrides.yaml'
|
||||
|
||||
Reference in New Issue
Block a user