diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7ed3dfd8..6569cc6f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -18,10 +18,11 @@ Codes to reproduce the behavior: ``` **Environment** -- OS(e.g. `Ubuntu 22.04`): -- vsag version(e.g. `v0.11.0` or `7f94a27`): -- compiler version(e.g. `GCC 11.4.0`): -- interface(`cpp` or `python`): +Please run `bash scripts/check_environment.sh` and paste the output here: +- OS: e.g. `Ubuntu 22.04` +- vsag version: e.g. `v0.11.0` or `7f94a27` +- compiler version: e.g. `GCC 11.4.0` +- interface: `cpp` or `python` **Expected behavior** A clear and concise description of what you expected to happen. @@ -31,4 +32,3 @@ If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. - diff --git a/scripts/check_environment.sh b/scripts/check_environment.sh new file mode 100644 index 00000000..ca5aee88 --- /dev/null +++ b/scripts/check_environment.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +function get_os() { + os_name=$(cat /etc/*-release | grep '^NAME=' | awk -F= '{print $2}' | tr -d '"') + os_version=$(cat /etc/*-release | grep '^VERSION_ID=' | awk -F= '{print $2}' | tr -d '"') + echo "- OS: $os_name $os_version" +} + +function get_vsag() { + vsag_version=$(git describe --tags --always --dirty --match "v*") + echo "- vsag version: $vsag_version" +} + +function get_compiler() { + compiler_version=$(c++ --version | head -n 1) + echo "- compiler version: $compiler_version" +} + +get_os +get_vsag +get_compiler