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

Clean up packaging scripts #29

Merged
merged 4 commits into from
Jul 29, 2021
Merged

Clean up packaging scripts #29

merged 4 commits into from
Jul 29, 2021

Conversation

jdbaldry
Copy link
Member

@jdbaldry jdbaldry commented Jul 26, 2021

What this PR does:
Please see individual commit messages for details. This clean up fixes some undefined behavior, removes some confusing comments, lints each script with ShellCheck, and makes indentation consistent.

Besides the correction of the undefined equality operator behavior in posix shells, there is no functionality changed.

Checklist

  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

The comments were not describing the actual behavior of the script
which is self explanatory anyway.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
This may have worked any way depending on which shell is actually used
but this change is more technically correct and portable as '==' has
undefined behavior.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Copy link
Contributor

@stevesg stevesg left a comment

Choose a reason for hiding this comment

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

Changes look fine to me, but I would comment that if we're going to shellcheck things, then it probably needs to be done by the CI too because otherwise it will drift.

Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Changes LGTM.

I also agree with Steve about adding the shellcheck to lint Makefile target, so that it will run in CI too. You will need to add shellcheck to the build-image. Since it's not a 1 line change, I'm OK to merge this PR, but I would be glad if you could follow up with the linter thing 🙏

@pracucci pracucci merged commit 94622f6 into main Jul 29, 2021
@pracucci pracucci deleted the jdb/lint-packaging-scripts branch July 29, 2021 14:53
@pracucci
Copy link
Collaborator

I've also created an issue about the follow up work:
#41

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.

None yet

3 participants