Skip to content

Commit 1f052bf

Browse files
committed
make scripts in build/ independent from current dir
1 parent c4b6d0b commit 1f052bf

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

build/build.sh

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/usr/bin/env bash
22
set -eu
3+
4+
# macOS does not have realpath and readlink does not have -f option, so do this instead:
5+
script_dir=$( cd "$(dirname "$0")" ; pwd -P )
6+
cd "${script_dir}/.." # move to project root dir
7+
38
args="$@"
49
buildDir=${PWD}/build-artifacts
510

build/ci.sh

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
# macOS does not have realpath and readlink does not have -f option, so do this instead:
5+
script_dir=$( cd "$(dirname "$0")" ; pwd -P )
6+
cd "${script_dir}/.." # move to project root dir
7+
48
args="$@"
59

610
bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-c/main/download.sh) --quiet --sync 0.15.0

build/test.sh

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22
set -eu
33

4+
# macOS does not have realpath and readlink does not have -f option, so do this instead:
5+
script_dir=$( cd "$(dirname "$0")" ; pwd -P )
6+
cd "${script_dir}/.." # move to project root dir
7+
48
unformatted_files=$(gofmt -l .)
59
if [[ ${unformatted_files} ]]; then
610
echo "Some files are not formatted properly. You can use \`gofmt -l -w .\` to fix them:"

0 commit comments

Comments
 (0)