Skip to content

Commit a613e9c

Browse files
authored
Merge pull request #100 from andriumon/main
Minor fix in output table and updated run_rsfc script
2 parents 517528a + 29f5b9b commit a613e9c

2 files changed

Lines changed: 25 additions & 4 deletions

File tree

run_rsfc.sh

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ REPO_URL=""
55
TEST_ID=""
66
FTR_FLAG=false
77
TOKEN=""
8+
BRANCH=""
9+
TAG=""
810

911
while [[ $# -gt 0 ]]; do
1012
case "$1" in
@@ -24,9 +26,17 @@ while [[ $# -gt 0 ]]; do
2426
TOKEN="$2"
2527
shift 2
2628
;;
29+
-b)
30+
BRANCH="$2"
31+
shift 2
32+
;;
33+
-v)
34+
TAG="$2"
35+
shift 2
36+
;;
2737
*)
2838
echo "Unknown argument: $1"
29-
echo "Usage: $0 --repo <repo_url> [--ftr] [--id <test_id>] [-t <github_token>]"
39+
echo "Usage: $0 --repo <repo_url> [--ftr] [--id <test_id>] [-t <github_token>] [-b <branch>] [-v <tag>]"
3040
exit 1
3141
;;
3242
esac
@@ -42,6 +52,14 @@ mkdir -p "$OUTPUT_DIR"
4252

4353
DOCKER_ARGS="--repo $REPO_URL"
4454

55+
if [ -n "$BRANCH" ]; then
56+
DOCKER_ARGS="$DOCKER_ARGS -b $BRANCH"
57+
fi
58+
59+
if [ -n "$TAG" ]; then
60+
DOCKER_ARGS="$DOCKER_ARGS -v $TAG"
61+
fi
62+
4563
if [ "$FTR_FLAG" = true ]; then
4664
DOCKER_ARGS="$DOCKER_ARGS --ftr"
4765
fi
@@ -57,5 +75,5 @@ fi
5775
docker run --rm \
5876
-v "$(pwd)/$OUTPUT_DIR:/rsfc/rsfc_output" \
5977
-e PYTHONWARNINGS="ignore" \
60-
amonterodx/rsfc:0.1.3 \
61-
$DOCKER_ARGS
78+
rsfc-docker \
79+
$DOCKER_ARGS

src/rsfc/rsfc_core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ def start_assessment(repo_url, branch, tag, ftr, test_id, token):
2929
table, info, badge = assess.to_terminal_table(test_id, badge_url)
3030
report = mdRep.MarkdownReportGenerator(rsfc_asmt, table)
3131
report.generate("./RSFC_REPORT.md")
32-
table = table + info + badge
32+
if test_id != None:
33+
table = table + info
34+
else:
35+
table = table + info + badge
3336

3437
return rsfc_asmt, table

0 commit comments

Comments
 (0)