Skip to content

Commit

Permalink
Merge pull request #248 from maheshmeleti/chore-upgrade-install.sh
Browse files Browse the repository at this point in the history
added get_latest_tag in install.sh
  • Loading branch information
Chemaclass authored Mar 13, 2024
2 parents 4613813 + e7f090e commit 675fd42
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
13 changes: 6 additions & 7 deletions .github/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
This is a guide to know the steps to create a new release.

1. Update the version in [BASHUNIT_VERSION](../bashunit)
2. Update the version in [LATEST_BASHUNIT_VERSION](../install.sh)
3. Update the version in [CHANGELOG.md](../CHANGELOG.md)
4. Update the version in [package.json](../package.json)
5. Create a [new release](https://github.com/TypedDevs/bashunit/releases/new) from GitHub
6. Attach the latest executable to the release
2. Update the version in [CHANGELOG.md](../CHANGELOG.md)
3. Update the version in [package.json](../package.json)
4. Create a [new release](https://github.com/TypedDevs/bashunit/releases/new) from GitHub
5. Attach the latest executable to the release
1. Generate a new bashunit with `build.sh`
2. Attach the generated file to the release page on GitHub
3. Keep the name `bashunit`
7. Commit and push
8. Rebase `latest` branch from the new created tag and push
6. Commit and push
7. Rebase `latest` branch from the new created tag and push
1. This will trigger "build and deploy" the docs
12 changes: 11 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@

# shellcheck disable=SC2164
# shellcheck disable=SC2103
declare -r BASHUNIT_GIT_REPO="https://github.com/TypedDevs/bashunit"

function get_latest_tag() {
git ls-remote --tags "$BASHUNIT_GIT_REPO" |
awk '{print $2}' |
sed 's|^refs/tags/||' |
sort -Vr |
head -n 1
}

declare -r LATEST_BASHUNIT_VERSION="0.11.0"
declare -r LATEST_BASHUNIT_VERSION="$(get_latest_tag)"

DIR=${1-lib}
VERSION=${2-latest}
TAG="$LATEST_BASHUNIT_VERSION"


function build_and_install_beta() {
echo "> Downloading non-stable version: 'beta'"
git clone --depth 1 --no-tags https://github.com/TypedDevs/bashunit temp_bashunit 2>/dev/null
Expand Down

0 comments on commit 675fd42

Please sign in to comment.