Skip to content

Commit

Permalink
chore: add issue_templates and enhence argc version (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden authored Jun 2, 2024
1 parent 842f5f0 commit 80e3202
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

<!-- Your issue may already be reported! Please search for it before creating one. -->

**Describe the bug**
<!-- A clear and concise description of what the bug is.
**To Reproduce**
<!-- Steps to reproduce the behavior, including any relevant code snippets. -->

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

**Screenshots/Logs**
<!-- If applicable, add screenshots to help explain your problem. -->

**Environment**
<!-- Please run `argc version` and paste the output -->

**Additional context**
<!-- Add any other context about the problem here. -->
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

<!-- Your issue may already be reported! Please search for it before creating one. -->

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
18 changes: 17 additions & 1 deletion Argcfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,17 @@ install() {

# @cmd Show versions of required tools for bug reports.
version() {
uname -a
argc --argc-version
jq --version
curl --version | head -n 1
for item in "${LANG_CMDS[@]}"; do
cmd="${item#*:}"
if [[ "$cmd" == "bash" ]]; then
echo "$(argc --argc-shell-path) $("$(argc --argc-shell-path)" --version | head -n 1)"
elif command -v "$cmd" &> /dev/null; then
echo "$(_normalize_path "$(which $cmd)") $($cmd --version)"
fi
done
}

_lang_to_cmd() {
Expand Down Expand Up @@ -213,6 +221,14 @@ $run "%script_dir%cmd\cmd.$lang" "%script_name%.$lang" %*
EOF
}

_normalize_path() {
if _is_win; then
cygpath -w "$1"
else
echo "$1"
fi
}

_is_win() {
if [[ "$OS" == "Windows_NT" ]]; then
return 0
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Make sure you have the following tools installed:

- [argc](https://github.com/sigoden/argc): A bash command-line framewrok and command runner
- [jq](https://github.com/jqlang/jq): A JSON processor
- [curl](https://curl.se): A command-line tool for transferring data with URLs

## Getting Started with AIChat

Expand Down

0 comments on commit 80e3202

Please sign in to comment.