Skip to content

Commit

Permalink
Resolution for issue 116 regarding changelog entries
Browse files Browse the repository at this point in the history
  • Loading branch information
verbman committed Mar 21, 2024
1 parent 8c54f5e commit 4707858
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Impacted periods: all.
* Impacted areas: all
* Details:
- Improvements to bootstrap.sh to improve experience for first time users. It includes
- Improvements to `bootstrap.sh` to improve experience for first time users. It includes
- removing the need to set `COUNTRY_NAME` and `REPOSITORY_URL` before running.
- introduces a simple guided setup process
- provides a confirmation option/exit script option before changes are made
Expand Down Expand Up @@ -46,6 +46,7 @@
- `openfisca_country_template/texts/situations/income_tax.yaml`
- `openfisca_country_template/variables/demographics.py`
- `openfisca_country_template/variables/taxes.py`
- Altered `CHANGELOG.md` added example entry and altered `bootstrap.sh` to strip out country-template entries. This resolves [issue 116](https://github.com/openfisca/country-template/issues/116).


### 6.0.3 [#136](https://github.com/openfisca/country-template/pull/136)
Expand Down Expand Up @@ -717,3 +718,19 @@ See more on the OpenFisca-Core [changelog](https://github.com/openfisca/openfisc
- `taxes`.
* Details:
- Build the skeleton of the tax and benefit system.

# Example Entry

## 0.0.1 - [#1](https://github.com/openfisca/country-template/pull/1)

* Tax and benefit system evolution.
* Impacted periods: all.
* Impacted areas:
- `benefits`.
- `demographics`.
- `housing`.
- `income`.
- `stats`.
- `taxes`.
* Details:
- Demonstration changelog entry which can be modified for your first entry
3 changes: 3 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ esac
parent_folder=${PWD##*/}

last_bootstrapping_line_number=$(grep --line-number '^## Writing the Legislation' README.md | cut -d ':' -f 1)
last_changelog_number=$(grep --line-number '^# Example Entry' CHANGELOG.md | cut -d ':' -f 1)

first_commit_message='Initial import from OpenFisca country-template'
second_commit_message='Customise country-template through script'

Expand Down Expand Up @@ -91,6 +93,7 @@ sed -i.template "s|country_template|$CODE_JURISDICTION_LABEL|g" README.md pyproj
sed -i.template "s|Country-Template|$JURISDICTION_NAME|g" README.md pyproject.toml .github/workflows/workflow.yml .github/PULL_REQUEST_TEMPLATE.md CONTRIBUTING.md
sed -i.template -e "3,${last_bootstrapping_line_number}d" README.md # remove instructions lines
sed -i.template "s|https://example.com/repository|$REPOSITORY_URL|g" README.md CONTRIBUTING.md
sed -i.template -e "1,${last_changelog_number}d" CHANGELOG.md # remove country-template CHANGELOG leaving example
sed -i.template "s|https://github.com/openfisca/country-template|$REPOSITORY_URL|g" pyproject.toml
sed -i.template "s|repository_folder|$REPOSITORY_FOLDER|g" README.md
find . -name "*.template" -type f -delete
Expand Down

0 comments on commit 4707858

Please sign in to comment.