Skip to content

Commit

Permalink
Add script for self-tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Jan 27, 2022
1 parent cd75cc9 commit 84be096
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ jobs:
with:
name: oft
path: product/target/openfasttrace-*.jar

- name: Trace requirements
run: ./oft-self-trace.sh
File renamed without changes.
File renamed without changes.
9 changes: 8 additions & 1 deletion oft
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@

script_path=$(dirname "$(readlink -f "$0")")
version=$(grep -zo '<revision>.*</revision>' parent/pom.xml | sed -e's/[^0-9.]//g')
jar_file="$script_path/product/target/openfasttrace-$version.jar"

java -jar "$script_path/product/target/openfasttrace-$version.jar" $@
if [ ! -f "$jar_file" ]; then
echo "JAR file $jar_file not found."
echo "Build it by running 'mvn package'"
exit 1
fi

java -jar "$jar_file" $@
22 changes: 22 additions & 0 deletions oft-self-trace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

script_path=$(dirname "$(readlink -f "$0")")
base_dir="$script_path"
oft_script="$base_dir/oft"

$oft_script trace "$base_dir/doc/spec" \
"$base_dir/importer/markdown/src" \
"$base_dir/importer/specobject/src" \
"$base_dir/importer/zip/src" \
"$base_dir/importer/tag/src" \
"$base_dir/core/src" \
"$base_dir/reporter/plaintext/src" \
"$base_dir/reporter/html/src" \
"$base_dir/reporter/aspec/src" \
"$base_dir/product/target/test-classes/example/src" \
"$base_dir/product/src" \
"$base_dir/product/src/test/resources/example/src" \
"$base_dir/api/src" \
"$base_dir/exporter/specobject/src" \
"$base_dir/exporter/common/src" \
"$base_dir/testutil/src"

0 comments on commit 84be096

Please sign in to comment.