mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2024-12-09 16:35:21 +00:00
72446a5b1e
We don't need GIT_API_KEY to clone the assets branch, so don't require it.
19 lines
524 B
Bash
Executable File
19 lines
524 B
Bash
Executable File
#!/bin/bash
|
|
# Script to setup the assets clone of the repository using GIT_ASSETS_BRANCH and
|
|
# GIT_API_KEY.
|
|
|
|
[ ! -z "$GIT_ASSETS_BRANCH" ] || exit 1
|
|
|
|
setup_git() {
|
|
git config --global user.email "travis@travis-ci.org" || exit 1
|
|
git config --global user.name "Travis CI" || exit 1
|
|
}
|
|
|
|
# Constants
|
|
ASSETS_DIR=".assets-branch"
|
|
|
|
# Clone the assets branch with the correct credentials
|
|
git clone --single-branch -b "$GIT_ASSETS_BRANCH" \
|
|
"https://${GIT_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git" "$ASSETS_DIR" || exit 1
|
|
|