From 9ca14238e6bb9e5ecc749b104eaf20f3eeeddaee Mon Sep 17 00:00:00 2001 From: Nemo Date: Sat, 30 Apr 2022 16:54:25 +0530 Subject: [PATCH] Add CITATION file [skip ci] --- .github/workflows/update.yml | 2 +- CITATION.cff | 9 +++++++++ fetch.sh | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 CITATION.cff diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index c06fc76..8cef8b6 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -22,7 +22,7 @@ jobs: # Versioning is current date format: "YYYY.M.D" - name: Update data - run: ./fetch.sh + run: ./fetch.sh "${{ steps.current-time.outputs.formattedTime }}" # Only tag if we're running on the scheduled job - uses: stefanzweifel/git-auto-commit-action@v4 if: ${{ github.event_name == 'schedule' }} diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..2dec8b9 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,9 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: +- family-names: "Rana" + given-names: "Abhay" + orcid: " https://orcid.org/0000-0002-7993-1363" +title: "India ISIN Database, by Nemo" +version: 2022.4.30 +url: "https://github.com/captn3m0/india-isin-database" diff --git a/fetch.sh b/fetch.sh index ea307b5..1de0a75 100755 --- a/fetch.sh +++ b/fetch.sh @@ -62,4 +62,7 @@ for i in E F 9; do # Remove lines that don't start with the correct prefix # This is to avoid ISINs like INF955L01IN9 showing up under IN9 sed -i '/^IN$i/!d' "IN$i.csv" -done \ No newline at end of file +done + +# Update CITATION +git diff --quiet *.csv || (sed -i "s/^version.*/version: $1/" CITATION.cff && git add CITATION.cff)