Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Properly handle semantic versioning in initialize_gradle_project #27

Open
michaelin opened this issue Jan 30, 2021 · 0 comments
Open

Properly handle semantic versioning in initialize_gradle_project #27

michaelin opened this issue Jan 30, 2021 · 0 comments

Comments

@michaelin
Copy link
Contributor

michaelin commented Jan 30, 2021

The initialize_gradle_project function in utils.sh fails when the current Gradle version is a patch version (x.y.z):

vscode ➜ /workspaces/gradle-katas/build-phases (master ✗) $ ./setup.sh 
[KATA] Setting up the kata
[KATA] ------
[KATA] 
[KATA] Cleaning up old exercise
[KATA] Initializing new exercise
(standard_in) 1: syntax error
[KATA] Done!
vscode ➜ /workspaces/gradle-katas/build-phases (master ✗) $ gradle --version | grep Gradle | awk '{print $2}'
6.8.1

The problem is that bc can't compare semver version numbers. Consider using another tool or truncating the version before comparison.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant