From e45efd6de7ccedc594c076abfe468191c976b21f Mon Sep 17 00:00:00 2001 From: Mikhail Epatko Date: Tue, 5 Mar 2024 10:40:35 +0300 Subject: [PATCH] #3 Fixed output dir creation --- .github/workflows/main.yml | 5 ++--- README.md | 6 +++--- generate-badge.sh | 6 +----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f138968..9730dbf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,10 +18,9 @@ jobs: with: dir: . since: 2000-01-01 - output_dir: ./output-dir -# filename: hits.svg + output_dir: output-dir - uses: peaceiris/actions-gh-pages@v3.9.3 with: - publish_dir: ./output-dir + publish_dir: output-dir publish_branch: image-data github_token: ${{ github.token }} diff --git a/README.md b/README.md index 9cbe081..10f759b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # hoc-badge-action -![Hits-of-Code Badge](https://github.com/MikhailEpatko/hits-of-code-badge/blob/image-data/hits.svg) +![Hits-of-Code Badge](https://github.com/MikhailEpatko/hoc-badge-action/blob/image-data/hoc-badge.svg) GitHub action to generate Hits-of-Code badge with hoc calculated metric. @@ -28,10 +28,10 @@ jobs: dir: . # default value - include all files exclude: vendor/** # no default value since: 2000-01-01 # default value - '2000-01-01' - output_dir: ./output # default value - './output' + output_dir: ./output # default value - 'output' filename: hoc-badge.svg # default value - 'hoc-badge.svg' ``` -The badge will be generated into file ./output/hoc-badge.svg by default. +The badge will be generated into the file ./output/hoc-badge.svg by default. Use whatever tool you prefer to upload it somewhere. diff --git a/generate-badge.sh b/generate-badge.sh index 4b70e1d..bca3529 100755 --- a/generate-badge.sh +++ b/generate-badge.sh @@ -14,8 +14,4 @@ mkdir "$OutDir" Count=$(hoc -d "$Dir" -e "$Exclude" -s "$Since" -b "$Before" -f "int") echo "Hits of code: $Count" -anybadge -l "Hits of Code" -v "$Count" -f "$OutDir/$Filename" -c royalblue - -pwd - -ls "$OutDir" \ No newline at end of file +anybadge -l "Hits of Code" -v "$Count" -f "$OutDir/$Filename" -c royalblue \ No newline at end of file