Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to get SDK and Lang version #1219

Merged
merged 6 commits into from
Sep 25, 2024

Conversation

shaobo-he-aws
Copy link
Contributor

@shaobo-he-aws shaobo-he-aws commented Sep 20, 2024

Description of changes

Issue #, if available

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A backwards-compatible change requiring a minor version bump to cedar-policy (e.g., addition of a new API).

I confirm that this PR (choose one, and delete the other options):

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

I confirm that docs.cedarpolicy.com (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar language specification.

Signed-off-by: Shaobo He <shaobohe@amazon.com>
Signed-off-by: Shaobo He <shaobohe@amazon.com>
@john-h-kastner-aws
Copy link
Contributor

john-h-kastner-aws commented Sep 23, 2024

If we want this function (as opposed to a function returning the lang version). We should be able to get the SDK version from env vars to avoid the need for a manual update on every release.

  • CARGO_PKG_VERSION — The full version of your package.
  • CARGO_PKG_VERSION_MAJOR — The major version of your package.
  • CARGO_PKG_VERSION_MINOR — The minor version of your package.
  • CARGO_PKG_VERSION_PATCH — The patch version of your package.
  • CARGO_PKG_VERSION_PRE — The pre-release version of your package.

This information should also be available to Cedar consumers from their Cargo.lock file (using this crate), so I'm not sure I see the need for this. Cedar langauge version on the other hand is something only that can only be known if we explicitly report it.

@khieta khieta changed the title Add functino to get SDK version Add function to get SDK version Sep 23, 2024
@john-h-kastner-aws john-h-kastner-aws changed the title Add function to get SDK version Add function to get SDK and Lang version Sep 24, 2024
Copy link
Contributor

@khieta khieta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a function to the CLI to get the version number?

@shaobo-he-aws
Copy link
Contributor Author

Can you add a function to the CLI to get the version number?

Yes, working on it.

Signed-off-by: Shaobo He <shaobohe@amazon.com>
Signed-off-by: Shaobo He <shaobohe@amazon.com>
@shaobo-he-aws
Copy link
Contributor Author

Can you add a function to the CLI to get the version number?

Done.

@shaobo-he-aws shaobo-he-aws merged commit 235df04 into main Sep 25, 2024
19 checks passed
@shaobo-he-aws shaobo-he-aws deleted the feature/shaobo/sdk-version branch September 25, 2024 21:06
shaobo-he-aws added a commit that referenced this pull request Sep 25, 2024
Signed-off-by: Shaobo He <shaobohe@amazon.com>
andrewmwells-amazon pushed a commit that referenced this pull request Sep 26, 2024
Signed-off-by: Shaobo He <shaobohe@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants