Skip to content

Commit

Permalink
pull in replaceAll fix from refactor/watch-native
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Feb 13, 2025
1 parent 7db94de commit 7705a91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions native/c/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,13 @@ libztso.a: ztso.o
zowex: zowex.o libzcn.a libzut.a libzjb.a libzds.a libzusf.a libztso.a
@echo 'Building zowex'
$(CXX) $(CPP_BND_FLAGS) -o $@ $^ > $*.bind.lst
ln -sf $@ ../golang/$(basename $@) || true
ln -sf $@ ../golang/$(basename $@)
@echo 'Copied zowex to golang/'

zowexx: zowex.o libzcn.a libzut.a libzjb.a libzds.a libzusf.a libztso.a
@echo 'Building zowexx'
$(CXX) $(CPP_BND_FLAGS_AUTH) -o $@ $^ > $*.bind.lst
ln -sf $@ ../golang/$(basename $@) || true
ln -sf $@ ../golang/$(basename $@)
@echo 'Copied zowexx to golang/'

zowex.o: zowex.cpp
Expand Down
8 changes: 4 additions & 4 deletions scripts/watchNative.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ watcher.on("add", async (path, stats) => {
try {
await uploadFile(
path,
p.posix.join(config.deployDirectory, path.replace(p.sep, p.posix.sep))
p.posix.join(config.deployDirectory, path.replaceAll(p.sep, p.posix.sep))
);
} catch (err) {
console.error(" ✘", err);
Expand All @@ -195,18 +195,18 @@ watcher.on("change", async (path, stats) => {
try {
await uploadFile(
path,
p.posix.join(config.deployDirectory, path.replace(p.sep, p.posix.sep))
p.posix.join(config.deployDirectory, path.replaceAll(p.sep, p.posix.sep))
);
} catch (err) {
console.error(" ✘", err);
}
});

watcher.on("unlink", async (path, stats) => {
process.stdout.write(`${Date.now().toLocaleString()} [-] ${path}`);
process.stdout.write(`${new Date().toLocaleString()} [-] ${path}`);
try {
await deleteFile(
p.posix.join(config.deployDirectory, path.replace(p.sep, p.posix.sep))
p.posix.join(config.deployDirectory, path.replaceAll(p.sep, p.posix.sep))
);
} catch (err) {
console.error(" ✘", err);
Expand Down

0 comments on commit 7705a91

Please sign in to comment.