mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-13 18:25:45 +00:00
fix parsing of maven package cache
Depending on Maven version the file that contains name of repository will be named _remote.repositories or _maven.repositories. Signed-off-by: Jakub Sokołowski <jakub@status.im> Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
c74beec17a
commit
6aba34b82d
@ -3,6 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
||||||
|
source "${GIT_ROOT}/scripts/colors.sh"
|
||||||
|
|
||||||
if [[ -z "${IN_NIX_SHELL}" ]]; then
|
if [[ -z "${IN_NIX_SHELL}" ]]; then
|
||||||
echo "Remember to call 'make shell'!"
|
echo "Remember to call 'make shell'!"
|
||||||
@ -25,7 +26,16 @@ function gen_deps_list() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_repo_for_dir() {
|
function get_repo_for_dir() {
|
||||||
grep -oP '.*>\K\w+' "${1}/_remote.repositories" | uniq
|
# This file has different name depending on Maven version
|
||||||
|
if [[ -f "${1}/_remote.repositories" ]]; then
|
||||||
|
REPO_FILE="${1}/_remote.repositories"
|
||||||
|
elif [[ -f "${1}/_maven.repositories" ]]; then
|
||||||
|
REPO_FILE="${1}/_maven.repositories"
|
||||||
|
else
|
||||||
|
echo -e "${RED}Cannot find Maven repo file for:${RST} ${1}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
grep -oP '.*>\K\w+' "${REPO_FILE}" | uniq
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_nix_sha() {
|
function get_nix_sha() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user