Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions scripts/capture_design_fixture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(dirname "$SCRIPT_DIR")"

REPO="${REPO:-/home/shrsv/bin/LiveReview}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: warning

The path /home/shrsv/bin/LiveReview is hardcoded for the REPO variable.

Suggestions:

  1. Use a relative path or make this configurable via an environment variable with a more general default.
  2. Consider using $(pwd) or similar to derive the path dynamically relative to the script's execution context.

RANGE="${RANGE:-HEAD~8...HEAD}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: critical

The assignment to the RANGE variable includes the extraneous string m $REPO_ROOT ...".

Suggestions:

  1. Remove the accidental m $REPO_ROOT ..." suffix from the RANGE variable assignment.
  2. Ensure the line correctly reads RANGE="${RANGE:-HEAD~8...HEAD}".

PORT="${PORT:-8130}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: critical

The definitions for PORT, OUT, TIMEOUT_SECS, and LOG have been removed, along with the logic for building the lrc binary.

Suggestions:

  1. Confirm if these variables and the lrc build logic are still required for the script's functionality.
  2. If needed, restore the definitions for PORT, OUT, TIMEOUT_SECS, LOG, and the lrc binary build block.
  3. If intentionally removed, document the architectural change and ensure no downstream dependencies are broken.

OUT="${OUT:-$REPO_ROOT/tools/uidev/fixtures}"
TIMEOUT_SECS="${TIMEOUT_SECS:-600}"

LOG="$(mktemp /tmp/lrc-capture-XXXX.log)"

if [[ -z "${LRC:-}" ]]; then
LRC="$(mktemp /tmp/lrc-capture-bin-XXXX)"
echo "Building lrc from $REPO_ROOT ..."
RANGE="${RANGE:-HEAD~8...HEAD}"m $REPO_ROOT ..."
(cd "$REPO_ROOT" && go build -o "$LRC" .)
fi

Expand Down
Loading