TypedDevs / bashunit

A simple testing library for bash scripts. Test your bash scripts in the fastest and simplest way, discover the most modern bash testing library.
https://bashunit.typeddevs.com
MIT License
271 stars 21 forks source link

Remove downtime on install latest #225

Closed Chemaclass closed 3 months ago

Chemaclass commented 7 months ago

Current

When creating a new release, we have to change the release version in many files (see .github/RELEASE.md). However, currently the install.sh is one of them and that's creating a downtime when we are creating a new release - during the time when this change it's pushed and the actual new release is created, the installer tool wont work.

Expected

Instead of using a hardcoded version on install.sh, we should get the latest stable version. In this PR, we introduced get_latest_tag() and we could use it on install.sh script instead of a hardcoded version.

function helpers::get_latest_tag() {
  git ls-remote --tags "$BASHUNIT_GIT_REPO" |
    awk '{print $2}' |
    sed 's|^refs/tags/||' |
    sort -V |
    tail -n 1
}
gpuligundla commented 7 months ago

Can i work on it ?

antonio-gg-dev commented 7 months ago

Great to see you back here again, @gpuligundla !

Of course, would you mind waiting a bit before starting it? We want to make some small changes to your last contribution that might affect the way to solve this issue.

When we make the changes, we'll let you know so that you can take a look at them too and then you can start this one. Meanwhile, I'll go ahead and assign it to you. 😊

antonio-gg-dev commented 7 months ago

@gpuligundla we already merged #227 so you can start this issue when you want 😃

Chemaclass commented 7 months ago

Actually, I think we should copy/paste the helpers::get_latest_tag() function entirely in the install.sh script, because it must be a fully independent script, as it it what the users will download (as single script) to install bashunit. So we cannot source/load other scripts within the installer.

maheshmeleti commented 5 months ago

I would like to work on this, please assign this issue to me.

antonio-gg-dev commented 5 months ago

@maheshmeleti sure, thank you!

Chemaclass commented 4 months ago

@maheshmeleti let us know if you need help with this

maheshmeleti commented 4 months ago

@Chemaclass im still working on it