-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: setup failing because inexisting function
- Loading branch information
1 parent
fb3da4a
commit 92946e0
Showing
17 changed files
with
88 additions
and
32 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# OpenFisca Setup Builder | ||
|
||
<img width="821" alt="Screenshot 2024-10-22 at 18 01 25" src="https://github.com/user-attachments/assets/f89f3bb9-f752-466e-bff8-e192b264c3e3"> | ||
|
||
## Writing the Legislation | ||
|
||
Example section for writing the legislation. |
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
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 |
---|---|---|
|
@@ -45,7 +45,9 @@ setup::changelog_lineno() { | |
# @arg $1 The parent folder. | ||
# @arg $2 The setup name label. | ||
# @arg $3 The first commit message. | ||
# @arg $4 If we are running in dry mode. | ||
setup::first_commit() { | ||
if "${4:-false}"; then return; fi | ||
cd .. | ||
mv "${1}" openfisca-"${2}" | ||
cd openfisca-"${2}" | ||
|
@@ -62,7 +64,9 @@ setup::first_commit() { | |
# @arg $2 The jurisdiction snake cased. | ||
# @arg $3 The normal jurisdiction name. | ||
# @arg $4 The list of files to replace. | ||
# @arg $5 If we are running in dry mode. | ||
setup::replace_references() { | ||
if "${5:-false}"; then return; fi | ||
sed -i.template "s|openfisca-extension_template|openfisca-${1}|g" \ | ||
README.md Taskfile.yaml pyproject.toml CONTRIBUTING.md | ||
# shellcheck disable=SC2086 | ||
|
@@ -75,30 +79,38 @@ setup::replace_references() { | |
|
||
# @description Remove bootstrap instructions. | ||
# @arg $1 The last line number of the bootstrapping section in the README.md. | ||
# @arg $2 If we are running in dry mode. | ||
setup::remove_bootstrap_instructions() { | ||
if "${2:-false}"; then return; fi | ||
sed -i.template -e "3,${1}d" README.md | ||
find . -name "*.template" -type f -delete | ||
} | ||
|
||
# @description Prepare README.md and CONTRIBUTING.md. | ||
# @arg $1 The repository URL. | ||
# @arg $2 If we are running in dry mode. | ||
setup::prepare_readme_contributing() { | ||
if "${2:-false}"; then return; fi | ||
sed -i.template "s|https://example.com/repository|${1}|g" \ | ||
README.md CONTRIBUTING.md | ||
find . -name "*.template" -type f -delete | ||
} | ||
|
||
# @description Prepare CHANGELOG.md. | ||
# @arg $1 The last line number of the changelog section in the CHANGELOG.md. | ||
# @arg $2 If we are running in dry mode. | ||
setup::prepare_changelog() { | ||
if "${2:-false}"; then return; fi | ||
sed -i.template -e "1,${1}d" CHANGELOG.md | ||
find . -name "*.template" -type f -delete | ||
} | ||
|
||
# @description Prepare pyproject.toml. | ||
# @arg $1 The repository URL. | ||
# @arg $2 The repository folder. | ||
# @arg $3 If we are running in dry mode. | ||
setup::prepare_pyproject() { | ||
if "${3:-false}"; then return; fi | ||
sed -i.template \ | ||
"s|https://github.com/openfisca/extension-template|${1}|g" \ | ||
pyproject.toml | ||
|
@@ -110,12 +122,16 @@ setup::prepare_pyproject() { | |
|
||
# @description Rename the package. | ||
# @arg $1 The new package name. | ||
# @arg $2 If we are running in dry mode. | ||
setup::rename_package() { | ||
if "${2:-false}"; then return; fi | ||
git mv openfisca_extension_template "${1}" | ||
} | ||
|
||
# Remove single use first time setup files | ||
# @arg $1 If we are running in dry mode. | ||
setup::remove_files() { | ||
if "${1:-false}"; then return; fi | ||
git rm .github/workflows/first-time-setup.yml &>/dev/null 2>&1 | ||
git rm bashdep.sh &>/dev/null 2>&1 | ||
git rm build.sh &>/dev/null 2>&1 | ||
|
@@ -126,7 +142,9 @@ setup::remove_files() { | |
|
||
# @description Second commit and first tag. | ||
# @arg $1 The second commit message. | ||
# @arg $2 If we are running in dry mode. | ||
setup::second_commit() { | ||
if "${2:-false}"; then return; fi | ||
git add . | ||
git commit --no-gpg-sign --quiet --message "${1}" \ | ||
--author='OpenFisca Bot <[email protected]>' | ||
|
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
declare -xr DRY_MODE=true | ||
declare -xr JURISDICTION_NAME="L'Île-d'Yeu" | ||
declare -xr REPOSITORY_URL='https://github.com/openfisca/openfisca-ile-d_yeu' | ||
|
||
source 'src/first_time_setup/utils/colours.sh' | ||
|
||
result=$(./first-time-setup.sh 2>&1 1>/dev/null) | ||
|
||
if [[ -n "${result}" ]]; then | ||
colour::fail 'First time setup failed with error:' | ||
colour::logs "${result}" | ||
exit 1 | ||
fi | ||
|
||
colour::done 'First time setup ran successfully!' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.