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 cpe translations to release #11

Merged
merged 4 commits into from
Aug 15, 2022
Merged

Conversation

michalnicp
Copy link
Contributor

@michalnicp michalnicp commented Aug 10, 2022


# Note that a new commit must be made for each release, otherwise GitHub does not order
# the releases properly.
- name: Tag
if: hashFiles('fleet/*.sqlite.gz') != ''
Copy link

@roperzh roperzh Aug 12, 2022

Choose a reason for hiding this comment

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

just double checking: why did you decide to remove this? seems like this step will always run now, independently if new files were generated or not?

(is it because you have no way of telling if the json file has changed?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was redundant. If any previous step fails, then this step won't run. No need to override the if condition to check if the file was correctly generated.

Copy link

Choose a reason for hiding this comment

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

ah, makes sense

@@ -33,23 +33,27 @@ jobs:
go-version: '^1.17.3'

- name: Generate CPE database
run: cd fleet && go mod download && go run -tags fts5 cmd/cpe/generate.go && cat ./etagenv >> $GITHUB_ENV
run: |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to be more readable. | preserves newlines. By default the shell is /bin/bash -e which means any errors cause an early exit so no need to && everything together.

go mod download
go run -tags fts5 cmd/cpe/generate.go

- name: Current date
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use the current date for releases. If multiple releases are created on the same day, then github sorts in descending order by name. Using the etag (a hash) results in random order.

@michalnicp michalnicp merged commit d1950cf into master Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants