Skip to content

Commit

Permalink
#3 Fixed output dir creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Epatko committed Mar 5, 2024
1 parent 8432b65 commit e45efd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Expand Up @@ -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 }}
6 changes: 3 additions & 3 deletions 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.
Expand Down Expand Up @@ -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.
6 changes: 1 addition & 5 deletions generate-badge.sh
Expand Up @@ -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"
anybadge -l "Hits of Code" -v "$Count" -f "$OutDir/$Filename" -c royalblue

0 comments on commit e45efd6

Please sign in to comment.