ci: fix new api dev build meta script
Run the set-api-build-metadata on merge requests for testing Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2351>
This commit is contained in:
parent
7d96baa3cd
commit
a3be49e099
|
@ -372,7 +372,7 @@ build_api:
|
||||||
script:
|
script:
|
||||||
- rm -rf api/tests
|
- rm -rf api/tests
|
||||||
- >
|
- >
|
||||||
if [[ "$CI_COMMIT_REF_NAME" =~ ^develop|stable$ ]]; then
|
if [[ -z "$CI_COMMIT_TAG" ]]; then
|
||||||
./scripts/set-api-build-metadata.sh $CI_COMMIT_SHORT_SHA;
|
./scripts/set-api-build-metadata.sh $CI_COMMIT_SHORT_SHA;
|
||||||
fi
|
fi
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -425,7 +425,7 @@ deploy_docs:
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
- >
|
- >
|
||||||
if [[ "$CI_COMMIT_REF_NAME" =~ ^develop|stable$ ]]; then
|
if [[ -z "$CI_COMMIT_TAG" ]]; then
|
||||||
./scripts/set-api-build-metadata.sh $CI_COMMIT_SHORT_SHA;
|
./scripts/set-api-build-metadata.sh $CI_COMMIT_SHORT_SHA;
|
||||||
fi
|
fi
|
||||||
cache:
|
cache:
|
||||||
|
|
|
@ -10,8 +10,12 @@ error() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
command -v git > /dev/null || error "git command not found!"
|
||||||
command -v poetry > /dev/null || error "poetry command not found!"
|
command -v poetry > /dev/null || error "poetry command not found!"
|
||||||
|
|
||||||
|
# We assume this script only runs in a git repository
|
||||||
|
cd "$(git rev-parse --show-toplevel)/api"
|
||||||
|
|
||||||
COMMIT_SHA="$1"
|
COMMIT_SHA="$1"
|
||||||
|
|
||||||
CURRENT_VERSION="$(poetry version --short)"
|
CURRENT_VERSION="$(poetry version --short)"
|
||||||
|
|
Loading…
Reference in New Issue