-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Allow install beta #211
Merged
Merged
Allow install beta #211
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
aa9bb3e
red: tests/acceptance/install_test.sh
Chemaclass 1b67c6e
refactor: install.sh split main to concrete_version
Chemaclass f83e084
green: test_install_downloads_the_main_version
Chemaclass 336a5b6
update changelog
Chemaclass 99e760a
update installation docs
Chemaclass 0f436d6
Set "(non-stable) main" version when install main
Chemaclass 161cff5
fix: replace BASHUNIT_VERSION value to (non-stable) main
Chemaclass 1040539
tests: unmock git in test_install_downloads_the_main_version
Chemaclass 53ba5fa
chore: use temp_bashunit instead of just temp directory name
Chemaclass f892017
fix: test error message on linux
antonio-gg-dev 37dcf9c
chore: rename main version to beta version
antonio-gg-dev 87a1573
chore: added missing assertion and rename a variable
khru 2197c2f
Merge branch 'main' into feat/210-allow-install-main
antonio-gg-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,19 +9,39 @@ DIR=${1-lib} | |
VERSION=${2-latest} | ||
TAG="$LATEST_BASHUNIT_VERSION" | ||
|
||
function install_main() { | ||
echo "> Downloading non-stable main" | ||
git clone --depth 1 --no-tags https://github.com/TypedDevs/bashunit temp_bashunit | ||
cd temp_bashunit | ||
./build.sh | ||
cd .. | ||
cp temp_bashunit/bin/bashunit bashunit | ||
sed -i -e 's/BASHUNIT_VERSION=".*"/BASHUNIT_VERSION="(non-stable) main"/g' bashunit | ||
rm -rf temp_bashunit | ||
echo "> bashunit has been installed in the '$DIR' folder" | ||
} | ||
|
||
function install_concrete_version() { | ||
if [[ $VERSION != 'latest' ]]; then | ||
TAG="$VERSION" | ||
echo "> Downloading a concrete version: '$TAG'" | ||
else | ||
echo "> Downloading the latest version: '$TAG'" | ||
fi | ||
|
||
curl -L -O -J "https://github.com/TypedDevs/bashunit/releases/download/$TAG/bashunit" 2>/dev/null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it make senses to add header on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
chmod u+x "bashunit" | ||
echo "> bashunit has been installed in the '$DIR' folder" | ||
antonio-gg-dev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
cd "$(dirname "$0")" | ||
rm -f "$DIR"/bashunit | ||
[ -d "$DIR" ] || mkdir "$DIR" | ||
cd "$DIR" | ||
|
||
if [[ $VERSION != 'latest' ]]; then | ||
TAG="$VERSION" | ||
echo "> Downloading a concrete version: '$TAG'" | ||
if [[ $VERSION == 'main' ]]; then | ||
antonio-gg-dev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
install_main | ||
else | ||
echo "> Downloading the latest version: '$TAG'" | ||
install_concrete_version | ||
antonio-gg-dev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fi | ||
|
||
curl -L -O -J "https://github.com/TypedDevs/bashunit/releases/download/$TAG/bashunit" 2>/dev/null | ||
chmod u+x "bashunit" | ||
echo "> bashunit has been installed in the '$DIR' folder" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ππ»