Skip to content
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

build: add first time setup script #63

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
.tox
build
dist
lib
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

### 2.0.5 - [#63](https://github.com/openfisca/extension-template/pull/63)

- Technical improvement
- Details:
- Add `first-time-setup.sh`

### 2.0.4 - [#62](https://github.com/openfisca/extension-template/pull/62)

- Technical improvement
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
all: test

uninstall:
rm -rf ./lib
poetry env remove --all
pip freeze | grep -v "^-e" | sed "s/@.*//" | xargs pip uninstall -y

Expand All @@ -13,6 +14,7 @@ install:
@# Install OpenFisca-Extension-Template for development.
@# The editable version of OpenFisca-Extension-Template allows contributors
@# to test as they code.
/bin/bash bashdep.sh
poetry install --all-extras --sync

format:
Expand Down
19 changes: 19 additions & 0 deletions bashdep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Ensure bashdep is installed
[[ ! -f lib/bashdep ]] && {
mkdir -p lib
curl -sLo lib/bashdep \
https://github.com/Chemaclass/bashdep/releases/download/0.1/bashdep
chmod +x lib/bashdep
}

readonly DEPENDENCIES=(
"https://github.com/openfisca/openfisca-setup-builder/releases/download/0.1.1/first-time-setup.sh"
)

# Load, configure and run bashdep
# shellcheck disable=SC1091
source lib/bashdep
bashdep::setup dir="." silent=false
bashdep::install "${DEPENDENCIES[@]}"
Loading