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

Versioning script #29

Merged
merged 5 commits into from
May 10, 2021
Merged

Versioning script #29

merged 5 commits into from
May 10, 2021

Conversation

chayim
Copy link
Contributor

@chayim chayim commented May 3, 2021

As per our discussion on #22 this is the first part of versioning, as discussed.

chayim added 2 commits April 28, 2021 12:53
When crossing the repository boundary, the script report the incorrect PRODUCT and VERSION values, instead relying on its own repository location. Given that readies is a utility repository, this yields incorrect values - since it is usually located within a repository as a submodule.
@chayim chayim linked an issue May 4, 2021 that may be closed by this pull request
@rafie
Copy link
Contributor

rafie commented May 4, 2021

@chayim Can we please please please do bash instead of sh? It really hearts me in my good eye. :-)

@chayim
Copy link
Contributor Author

chayim commented May 4, 2021

Given that it's written in sh and not bash, I'd say don't change it. sh is available across the unixes we support (currently), including *sd, meaning we don't need to install anything special. If we add something bash specific, we can change the #!shebang - but currently it would be inaccurate.

@rafie
Copy link
Contributor

rafie commented May 4, 2021

@chayim I'm aware of the advantages of using sh, but I deliberately decided to use bash across the board because sh syntax is very poor. When considering the tradeoff (of having to explicitly install bash on alpine and to cope with bash 3.0 on older macOS versions), I clearly prefer the possibility to use a reasonable syntax and of course bashdb, which is a major improvement in productivity.

@chayim
Copy link
Contributor Author

chayim commented May 6, 2021

Helping with tooling, I totally get. I'm biased to lowest common denominator - so I'll continue writing SH compliant Bash whenever possible. #! change inbound.

Let me know what you think of the function wrapper - and being forced to call the script with any argument (and ignoring it). The reason was to make the script itself sourceable - though we should yank that into shibumi. Personally - I need to call it as a script via make.

@rafie
Copy link
Contributor

rafie commented May 6, 2021

@chayim Good news is that we probably can use bashdb to debug sh scripts. However, if we want to go on using shibumi goodies with sh then we're out of luck.
The bigger problems I find with going with sh are:

  • A mixed bash/sh environment is looking for trouble,
  • Writing proper sh requires more diligence that most people in this group lack. I don't want people to make stupid errors and we chasing them around.
    So let's think about it a bit and see if it is worth it. Up until now, I haven't encounter any real/practical problem of doing bash even with the 3.2 language level (I avoid 5.0 syntax altogether).

@chayim
Copy link
Contributor Author

chayim commented May 6, 2021

Totally. It's a style thing - I try to write most common denominator until I have no choice.

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 6, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@chayim chayim merged commit 00f3ee9 into master May 10, 2021
@chayim chayim deleted the ck-22-versioning-strategy branch May 10, 2021 09:56
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.

Versioning strategy
2 participants