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

Simplify bin/bump-version #368

Merged
merged 1 commit into from
May 18, 2023
Merged

Commits on May 18, 2023

  1. Simplify bin/bump-version

    Over in
    #360 (comment),
    I noticed that bash was complaining about this script:
    ```bash
    bin/bump-version: line 9: ((: patch_level == 'major' || patch_level == 'minor' || patch_level == 'patch': syntax error: operand expected (error token is "'major' || patch_level == 'minor' || patch_level == 'patch'")
    ```
    
    I started to dig into it, but the `while` loop isn't needed, the `case`
    statement felt unecessarily complex so I simplified it to use an `if`
    statement.
    
    I also changed the argument from a flag-based argument to simple ordered
    argument, as again it seemed simpler and it matches the style of the
    bump version script over in `dependabot-core` so it's easier for
    engineers working across repos. If we later have additional flags, we
    can always switch it back later.
    
    Lastly, I found `patch_version` confusing given that `patch` is a
    specific value that can be used, so I renamed it to `version_type`.
    jeffwidman committed May 18, 2023
    Configuration menu
    Copy the full SHA
    3765acd View commit details
    Browse the repository at this point in the history