forked from yugabyte/yugabyte-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yugabyte#8173] Remove the third-party submodule and add a text file …
…with thirdparty SHA1 Summary: We have a thirdparty submodule. When switching branches, the thirdparty SHA1 is frequently left pointing to its old target commit, leading to spurious check-ins changing or reverting the thirdparty submodule. In this diff we are switching from using a submodule to just tracking the thirdparty SHA1 hash in a file. When we actually need to build third-party dependencies, we just clone the repository and check out the correct SHA1. If we are using a prebuilt third-party archive, we don't even need to create the thirdparty subdirectory of YugabyteDB source root. Test Plan: ./yb_build.sh locally Jenkins: compile only Reviewers: jason, rtsisyk, steve.varnau Reviewed By: rtsisyk, steve.varnau Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D11384
- Loading branch information
Showing
7 changed files
with
40 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,3 +101,5 @@ rrdiagram*.jar* | |
.cache | ||
|
||
target/ | ||
|
||
thirdparty/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[submodule "submodules/yugabyte-bash-common"] | ||
path = submodules/yugabyte-bash-common | ||
url = https://github.com/yugabyte/yugabyte-bash-common.git | ||
[submodule "thirdparty"] | ||
path = thirdparty | ||
url = https://github.com/yugabyte/yugabyte-db-thirdparty.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
# shellcheck source=build-support/common-build-env.sh | ||
. "${BASH_SOURCE[0]%/*}/common-build-env.sh" | ||
|
||
if [[ -n ${YB_THIRDPARTY_DIR:-} && | ||
$YB_THIRDPARTY_DIR != "$YB_SRC_ROOT/thirdparty" ]]; then | ||
fatal "YB_THIRDPARTY_ROOT is set and is not the 'thirdparty' subdirectory of the source root" \ | ||
"($YB_SRC_ROOT)." | ||
fi | ||
|
||
thirdparty_sha1=$(<"$YB_BUILD_SUPPORT_DIR/thirdparty_sha1.txt") | ||
if [[ ! $thirdparty_sha1 =~ ^[0-9a-f]{40}$ ]]; then | ||
fatal "Invalid thirdparty SHA1: $thirdparty_sha1" | ||
fi | ||
YB_THIRDPARTY_DIR=$YB_SRC_ROOT/thirdparty | ||
if [[ ! -d "$YB_THIRDPARTY_DIR" ]]; then | ||
git clone https://github.com/yugabyte/yugabyte-db-thirdparty.git "$YB_THIRDPARTY_DIR" | ||
fi | ||
cd "$YB_THIRDPARTY_DIR" | ||
current_sha1=$( git rev-parse HEAD ) | ||
if [[ ! $current_sha1 =~ ^[0-9a-f]{40}$ ]]; then | ||
fatal "Could not get current git SHA1 in $PWD" | ||
fi | ||
if [[ $current_sha1 != $thirdparty_sha1 ]]; then | ||
if ! git checkout "$thirdparty_sha1"; then | ||
git fetch | ||
git checkout "$thirdparty_sha1" | ||
fi | ||
fi | ||
|
||
./build_thirdparty.sh "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ee4e2e453b5b83fb045b7a755f25305206a4e806 | ||
|
Submodule thirdparty
deleted from
ee4e2e