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

Fix get script for tags #1664

Merged

Conversation

saschagrunert
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

We have to specify the right git ref for cosign to let the script work correctly on tags.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Fixed correct git ref usage for get script when being used on tags.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 4, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Sep 4, 2023
@saschagrunert
Copy link
Member Author

saschagrunert commented Sep 4, 2023

@rphillips @haircommander PTAL, works now as intended:

> ./scripts/get -t 4cd8c485758ad7bb5413e8b35903cff18bdc4b49
Welcome to the conmon-rs install script!
Using commit: 4cd8c485758ad7bb5413e8b35903cff18bdc4b49
Checking if all commands are available: curl jq
Found commit: 4cd8c485758ad7bb5413e8b35903cff18bdc4b49
Using git ref: refs/heads/main
Found cosign, verifying binary signature
Verified OK
Installed binary into: conmonrs

version: 0.5.1
tag: none
commit: 4cd8c485758ad7bb5413e8b35903cff18bdc4b49
build: 2023-08-31 08:07:13 +00:00
target: x86_64-unknown-linux-gnu
rustc 1.72.0 (5680fa18f 2023-08-23)
cargo 1.72.0 (103a7ff2e 2023-08-15)
> ./scripts/get -l v0.6.0
Welcome to the conmon-rs install script!
Using tag: v0.6.0
Checking if all commands are available: curl jq
Getting commit from tag
Found commit: 38d8e61c5210c8c917e35704fb862fda05d6fe5e
Using git ref: refs/tags/v0.6.0
Found cosign, verifying binary signature
Verified OK
Installed binary into: conmonrs

version: 0.6.0
tag: v0.6.0
commit: 38d8e61c5210c8c917e35704fb862fda05d6fe5e
build: 2023-09-04 06:58:55 +00:00
target: x86_64-unknown-linux-gnu
rustc 1.72.0 (5680fa18f 2023-08-23)
cargo 1.72.0 (103a7ff2e 2023-08-15)
> ./scripts/get
Welcome to the conmon-rs install script!
Checking if all commands are available: curl jq
Getting latest commit on main
Commit 38d8e61c5210c8c917e35704fb862fda05d6fe5e is tag ref
Found commit: 38d8e61c5210c8c917e35704fb862fda05d6fe5e
Using git ref: refs/tags/v0.6.0
Found cosign, verifying binary signature
Verified OK
Installed binary into: conmonrs

version: 0.6.0
tag: v0.6.0
commit: 38d8e61c5210c8c917e35704fb862fda05d6fe5e
build: 2023-09-04 06:58:55 +00:00
target: x86_64-unknown-linux-gnu
rustc 1.72.0 (5680fa18f 2023-08-23)
cargo 1.72.0 (103a7ff2e 2023-08-15)

We have to specify the right git ref for cosign to let the script work
correctly on tags.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert
Copy link
Member Author

@haircommander PTAL

@haircommander
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Sep 7, 2023
@openshift-merge-robot openshift-merge-robot merged commit 3907eb8 into containers:main Sep 7, 2023
30 checks passed
@saschagrunert saschagrunert deleted the get-script-tags branch September 7, 2023 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants