forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathinstall_meson_and_rebase.sh
More file actions
executable file
·51 lines (45 loc) · 1.48 KB
/
install_meson_and_rebase.sh
File metadata and controls
executable file
·51 lines (45 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /bin/sh
set -e
set -x
case $CIRRUS_OS in
freebsd | linux | darwin | windows | mingw)
;;
*)
echo "unsupported operating system ${CIRRUS_OS}"
exit 1
;;
esac
# install meson by using pip
install_meson () {
python3 -m pip install git+${MESON_REPO}@${MESON_BRANCH}
}
run_rebase_commands() {
git config user.email 'postgres-ci@example.com'
git config user.name 'Postgres CI'
# windows loses the executable bit, causing an unnecessary diff
git config core.filemode false
# windows changes file endings to crlf, causing test failures
git config core.autocrlf false
git remote add default-postgres https://github.com/postgres/postgres.git
git fetch default-postgres master
echo "Rebasing onto: $(git show --no-patch --abbrev-commit --pretty=oneline default-postgres/master)"
git rebase --autostash --no-verify default-postgres/master
}
# Rebase current branch onto Postgres HEAD
rebase_onto_postgres () {
# safe directory need to be set because of dubious ownership error
# debian complains $HOME not set when --global is used
# macOS complains about permissions when --system is used
# so, use --global for macOS and --system for others
case $CIRRUS_OS in
darwin)
git config --global --add safe.directory /tmp/cirrus-ci-build
;;
*)
git config --system --add safe.directory /tmp/cirrus-ci-build
;;
esac
run_rebase_commands
}
install_meson
rebase_onto_postgres