Skip to content

Commit 3ff6cb0

Browse files
committed
fix
1 parent 88e8b61 commit 3ff6cb0

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test-rewatch:
5050
bash ./rewatch/tests/suite-ci.sh
5151

5252
test-rewatch-ci:
53-
bash ./rewatch/tests/suite-ci.sh
53+
bash ./rewatch/tests/suite-ci.sh node_modules/.bin/rewatch
5454

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

rewatch/tests/suite-ci.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@
22
# Make sure we are in the right directory
33
cd $(dirname $0)
44

5+
# Get rewatch executable location from the first argument or use default
6+
if [ -n "$1" ]; then
7+
REWATCH_EXECUTABLE="$1"
8+
else
9+
REWATCH_EXECUTABLE="../target/release/rewatch"
10+
fi
11+
export REWATCH_EXECUTABLE
12+
513
source ./utils.sh
6-
(cd ../testrepo && yarn install)
714

8-
bold "Reset yarn.lock changes"
15+
# we need to reset the yarn.lock and package.json to the original state
16+
# so there is not diff in git. The CI will install new ReScript package
17+
bold "Reset package.json and yarn.lock"
918
git checkout ../testrepo/yarn.lock
10-
success "Reset yarn.lock"
19+
git checkout ../testrepo/package.json
20+
success "Reset package.json and yarn.lock"
1121

1222
bold "Rescript version"
1323
(cd ../testrepo && yarn rescript -v)

rewatch/tests/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ overwrite() { echo -e "\r\033[1A\033[0K$@"; }
33
success() { echo -e "- ✅ \033[32m$1\033[0m"; }
44
error() { echo -e "- 🛑 \033[31m$1\033[0m"; }
55
bold() { echo -e "\033[1m$1\033[0m"; }
6-
rewatch() { RUST_BACKTRACE=1 ../target/release/rewatch --no-timing=true $1; }
6+
rewatch() { RUST_BACKTRACE=1 $REWATCH_EXECUTABLE --no-timing=true $@; }
77

88
replace() {
99
if [[ $OSTYPE == 'darwin'* ]];

0 commit comments

Comments
 (0)