Skip to content

Commit

Permalink
deps: install bashunit:beta, create-pr:0.6, dumper:0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Oct 5, 2024
1 parent 4cc6010 commit f5af86e
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 43 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# bashunit
BASHUNIT_DEFAULT_PATH="tests"
BASHUNIT_TESTS_ENV="tests/helpers.sh"
BASHUNIT_TESTS_ENV="tests/bootstrap.sh"
BASHUNIT_LOG_PATH=local/out.log
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
bin/
lib/
###########
# IDE
###########
.idea/
.vscode/

###########
# Project
###########

# generated single executable after build
bin/

# third party tools
lib/

# third party dev-deps
src/dev/*
2 changes: 1 addition & 1 deletion entry-point
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ declare -r BASH_SKELETON_VERSION="0.1.0"
BASH_SKELETON_ROOT_DIR="$(dirname "${BASH_SOURCE[0]}")"
export BASH_SKELETON_ROOT_DIR

source "$BASH_SKELETON_ROOT_DIR/src/dev/debug.sh"
source "$BASH_SKELETON_ROOT_DIR/src/dev/dumper.sh"
source "$BASH_SKELETON_ROOT_DIR/src/main.sh"
# Initialize _ARGS as an array
_ARGS=()
Expand Down
26 changes: 24 additions & 2 deletions install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
#!/bin/bash

## bashunit
curl -s https://bashunit.typeddevs.com/install.sh | bash -s lib 0.16.0
# bashunit
curl -s https://bashunit.typeddevs.com/install.sh | bash -s lib beta

function download() {
local url=$1
local destination=$2
local name=${3:-$(basename "$destination")}

if curl -s -L "$url" -o "$destination"; then
echo "> $name installed successfully in '$(dirname "$destination")'"
chmod +x "$destination"
else
echo "Failed to install $name!"
exit 1
fi
}

# create-pr
download "https://github.com/Chemaclass/create-pr/releases/download/0.6/create-pr" \
"lib/create-pr"

# bash-dumper
download "https://github.com/Chemaclass/bash-dumper/releases/download/0.1/dumper.sh" \
"src/dev/dumper.sh"
Empty file added src/dev/.gitkeep
Empty file.
18 changes: 0 additions & 18 deletions src/dev/debug.sh

This file was deleted.

1 change: 1 addition & 0 deletions tests/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#!/bin/bash
10 changes: 0 additions & 10 deletions tests/helpers.sh

This file was deleted.

9 changes: 0 additions & 9 deletions tests/unit/helpers_test.sh

This file was deleted.

0 comments on commit f5af86e

Please sign in to comment.