Skip to content
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ repos:
hooks:
- id: flake8
language_version: python3
- repo: https://github.com/lovesegfault/beautysh
rev: master
hooks:
- id: beautysh
language_version: python3
args: [-i, '2'] # 2-space indentaion
Empty file modified scripts/build_package.sh
Whitespace-only changes.
24 changes: 8 additions & 16 deletions scripts/build_posix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ else
BASH_CMPLT_DIR=usr/local/etc/bash_completion.d
fi

print_error()
{
print_error() {
echo -e "\e[31m$1\e[0m" >&2
}

Expand All @@ -39,18 +38,15 @@ fi

trap 'print_error "FAIL"; exit 1' ERR

print_info()
{
print_info() {
echo -e "\e[32m$1\e[0m"
}

command_exists()
{
command_exists() {
command -v $1 >/dev/null 2>&1
}

fpm_build()
{
fpm_build() {
print_info "Building $1..."
VERSION=$(python -c "import dvc; from dvc import __version__; print(str(__version__))")
fpm -s dir \
Expand All @@ -64,14 +60,12 @@ fpm_build()
$FPM_PACKAGE_DIRS
}

cleanup()
{
cleanup() {
print_info "Cleaning up..."
rm -rf build
}

install_dependencies()
{
install_dependencies() {
print_info "Installing fpm..."
if command_exists dnf; then
sudo dnf install ruby-devel gcc make rpm-build
Expand All @@ -96,8 +90,7 @@ install_dependencies()
pip install -r scripts/build-requirements.txt
}

build_dvc()
{
build_dvc() {
print_info "Building dvc binary..."
pyinstaller \
--additional-hooks-dir $(pwd)/scripts/hooks dvc/__main__.py \
Expand Down Expand Up @@ -129,8 +122,7 @@ build_dvc()
fi
}

build()
{
build() {
cleanup
echo "PKG = \"$1\"" >dvc/utils/build.py
build_dvc
Expand Down
Empty file modified scripts/build_snap.sh
Whitespace-only changes.
Empty file modified scripts/ci/before_install.sh
Whitespace-only changes.
Empty file modified scripts/ci/check_patch.sh
Whitespace-only changes.
Empty file modified scripts/ci/check_python.sh
Whitespace-only changes.
Empty file modified scripts/ci/deploy_condition.sh
Whitespace-only changes.
Empty file modified scripts/ci/install.sh
Whitespace-only changes.
Empty file modified scripts/ci/install_azurite.sh
Whitespace-only changes.
Empty file modified scripts/ci/install_hadoop.sh
Whitespace-only changes.
Empty file modified scripts/ci/install_oss.sh
Whitespace-only changes.
Empty file modified scripts/ci/retry.sh
Whitespace-only changes.
3 changes: 1 addition & 2 deletions scripts/ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ set -e

python -mtests

if [[ "$TRAVIS_PULL_REQUEST" == "false" && \
"$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then
if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then
pip install codecov
codecov
fi
Empty file modified scripts/completion/dvc.bash
Whitespace-only changes.
Empty file modified scripts/completion/dvc.zsh
Whitespace-only changes.
Empty file modified scripts/pypi_upload.sh
Whitespace-only changes.