Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
jfrolich committed May 5, 2025
commit 3ff6cb08295f4af47546f18c294c7f5f81eb2b30
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test-rewatch:
bash ./rewatch/tests/suite-ci.sh

test-rewatch-ci:
bash ./rewatch/tests/suite-ci.sh
bash ./rewatch/tests/suite-ci.sh node_modules/.bin/rewatch

test-all: test test-gentype test-analysis test-tools test-rewatch

Expand Down
16 changes: 13 additions & 3 deletions rewatch/tests/suite-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
# Make sure we are in the right directory
cd $(dirname $0)

# Get rewatch executable location from the first argument or use default
if [ -n "$1" ]; then
REWATCH_EXECUTABLE="$1"
else
REWATCH_EXECUTABLE="../target/release/rewatch"
fi
export REWATCH_EXECUTABLE

source ./utils.sh
(cd ../testrepo && yarn install)

bold "Reset yarn.lock changes"
# we need to reset the yarn.lock and package.json to the original state
# so there is not diff in git. The CI will install new ReScript package
bold "Reset package.json and yarn.lock"
git checkout ../testrepo/yarn.lock
success "Reset yarn.lock"
git checkout ../testrepo/package.json
success "Reset package.json and yarn.lock"

bold "Rescript version"
(cd ../testrepo && yarn rescript -v)
Expand Down
2 changes: 1 addition & 1 deletion rewatch/tests/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ overwrite() { echo -e "\r\033[1A\033[0K$@"; }
success() { echo -e "- ✅ \033[32m$1\033[0m"; }
error() { echo -e "- 🛑 \033[31m$1\033[0m"; }
bold() { echo -e "\033[1m$1\033[0m"; }
rewatch() { RUST_BACKTRACE=1 ../target/release/rewatch --no-timing=true $1; }
rewatch() { RUST_BACKTRACE=1 $REWATCH_EXECUTABLE --no-timing=true $@; }

replace() {
if [[ $OSTYPE == 'darwin'* ]];
Expand Down
Loading