Merge pull request #315 from picocms/enhancement/static-badges
Add static shields.io badge generator
This commit is contained in:
commit
dbd8fa8c2f
8
.gitignore
vendored
8
.gitignore
vendored
@ -15,10 +15,10 @@ desktop.ini
|
|||||||
/composer.phar
|
/composer.phar
|
||||||
/vendor
|
/vendor
|
||||||
|
|
||||||
# phpDocumentor
|
# Build system
|
||||||
/_build/phpdoc/
|
/_build/phpdoc
|
||||||
/_build/phpdoc.cache/
|
/_build/phpdoc.cache
|
||||||
/_build/phpdoc-*/
|
/_build/deploy-*.git
|
||||||
|
|
||||||
# User config
|
# User config
|
||||||
/config/config.php
|
/config/config.php
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Pico
|
Pico
|
||||||
====
|
====
|
||||||
|
|
||||||
[](https://github.com/picocms/Pico/blob/master/LICENSE.md)
|
[](https://github.com/picocms/Pico/blob/master/LICENSE.md)
|
||||||
[](https://github.com/picocms/Pico/releases/latest)
|
[](https://github.com/picocms/Pico/releases/latest)
|
||||||
[](https://travis-ci.org/picocms/Pico)
|
[](https://travis-ci.org/picocms/Pico)
|
||||||
[](https://scrutinizer-ci.com/g/theshka/Pico/?branch=master)
|
[](https://scrutinizer-ci.com/g/theshka/Pico/?branch=master)
|
||||||
[](https://twitter.com/intent/tweet?text=Pico+is+a+stupidly+simple%2C+blazing+fast%2C+flat+file+CMS.+Visit+http%3A%2F%2Fpicocms.org+and+downlaod+%23picocms+today%21+via+%40gitpicocms&related=gitpicocms)
|
[](https://twitter.com/intent/tweet?text=Pico+is+a+stupidly+simple%2C+blazing+fast%2C+flat+file+CMS.+Visit+http%3A%2F%2Fpicocms.org+and+downlaod+%23picocms+today%21+via+%40gitpicocms&related=gitpicocms)
|
||||||
|
|
||||||
Pico is a stupidly simple, blazing fast, flat file CMS. See http://picocms.org/ for more info.
|
Pico is a stupidly simple, blazing fast, flat file CMS. See http://picocms.org/ for more info.
|
||||||
|
@ -1,40 +1,51 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ "$TRAVIS_PHP_VERSION" != "5.3" ]; then
|
if [ "$TRAVIS_PHP_VERSION" != "5.3" ]; then
|
||||||
echo "Skipping phpDoc deployment because this is not on the required runtime"
|
echo "Skipping branch deployment because this is not on the required runtime"
|
||||||
exit
|
exit 0
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ",$DEPLOY_PHPDOC_BRANCHES," != *,"$TRAVIS_BRANCH",* ]]; then
|
|
||||||
echo "Skipping phpDoc deployment because this branch ($TRAVIS_BRANCH) is not permitted to deploy"
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
echo "Skipping phpDoc deployment because this pull request (#$TRAVIS_PULL_REQUEST) is not permitted to deploy"
|
echo "Skipping branch deployment because this pull request (#$TRAVIS_PULL_REQUEST) is not permitted to deploy"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
|
if [[ ",$DEPLOY_PHPDOC_BRANCHES," != *,"$TRAVIS_BRANCH",* ]]; then
|
||||||
PHPDOC_GIT_DIR="$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID.git"
|
echo "Skipping phpDoc branch deployment because this branch ($TRAVIS_BRANCH) is not permitted to deploy"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEPLOYMENT_ID="${TRAVIS_BRANCH//\//_}"
|
||||||
|
DEPLOYMENT_DIR="$TRAVIS_BUILD_DIR/_build/deploy-$DEPLOYMENT_ID.git"
|
||||||
|
|
||||||
# clone repo
|
# clone repo
|
||||||
echo "Cloning repo..."
|
echo "Cloning repo..."
|
||||||
git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$PHPDOC_GIT_DIR"
|
git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$DEPLOYMENT_DIR"
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
|
||||||
cd "$PHPDOC_GIT_DIR"
|
cd "$DEPLOYMENT_DIR"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
# setup repo
|
||||||
|
github-setup.sh
|
||||||
|
|
||||||
# generate phpDocs
|
# generate phpDocs
|
||||||
generate-phpdoc.sh \
|
generate-phpdoc.sh \
|
||||||
"$TRAVIS_BUILD_DIR/.phpdoc.xml" \
|
"$TRAVIS_BUILD_DIR/.phpdoc.xml" \
|
||||||
"$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID.cache" "$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID" \
|
"$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID.cache" "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID" \
|
||||||
"Pico 1.0 API Documentation ($TRAVIS_BRANCH branch)"
|
"Pico 1.0 API Documentation ($TRAVIS_BRANCH branch)"
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
[ -n "$(git status --porcelain "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID.cache")" ] || exit 0
|
||||||
|
|
||||||
|
# commit phpDocs
|
||||||
|
echo "Committing changes..."
|
||||||
|
git add "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID.cache" "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID"
|
||||||
|
git commit \
|
||||||
|
--message="Update phpDocumentor class docs for $TRAVIS_BRANCH branch @ $TRAVIS_COMMIT" \
|
||||||
|
"$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID.cache" "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID"
|
||||||
|
[ $? -eq 0 ] || exit 1
|
||||||
|
echo
|
||||||
|
|
||||||
# deploy phpDocs
|
# deploy phpDocs
|
||||||
deploy-phpdoc.sh \
|
github-deploy.sh "$TRAVIS_REPO_SLUG" "heads/$TRAVIS_BRANCH" "$TRAVIS_COMMIT"
|
||||||
"Update phpDocumentor class docs for $TRAVIS_BRANCH branch @ $TRAVIS_COMMIT" \
|
|
||||||
"$TRAVIS_REPO_SLUG" "heads/$TRAVIS_BRANCH" "$TRAVIS_COMMIT"
|
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
@ -1,27 +1,65 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
[ "$DEPLOY_PHPDOC_RELEASES" == "true" ] || exit
|
if [ "$DEPLOY_PHPDOC_RELEASES" != "true" ]; then
|
||||||
|
echo "Skipping phpDoc release deployment because it has been disabled"
|
||||||
|
fi
|
||||||
|
if [ "$DEPLOY_VERSION_BADGE" != "true" ]; then
|
||||||
|
echo "Skipping version badge deployment because it has been disabled"
|
||||||
|
fi
|
||||||
|
if [ "$DEPLOY_PHPDOC_RELEASES" != "true" ] || [ "$DEPLOY_VERSION_BADGE" != "true" ]; then
|
||||||
|
[ "$DEPLOY_PHPDOC_RELEASES" != "true" ] && [ "$DEPLOY_VERSION_BADGE" != "true" ] && exit 0 || echo
|
||||||
|
fi
|
||||||
|
|
||||||
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
|
DEPLOYMENT_ID="${TRAVIS_BRANCH//\//_}"
|
||||||
PHPDOC_GIT_DIR="$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID.git"
|
DEPLOYMENT_DIR="$TRAVIS_BUILD_DIR/_build/deploy-$DEPLOYMENT_ID.git"
|
||||||
|
|
||||||
# clone repo
|
# clone repo
|
||||||
echo "Cloning repo..."
|
echo "Cloning repo..."
|
||||||
git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$PHPDOC_GIT_DIR"
|
git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$DEPLOYMENT_DIR"
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
|
||||||
cd "$PHPDOC_GIT_DIR"
|
cd "$DEPLOYMENT_DIR"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# generate phpDocs
|
# setup repo
|
||||||
generate-phpdoc.sh \
|
github-setup.sh
|
||||||
"$TRAVIS_BUILD_DIR/.phpdoc.xml" \
|
|
||||||
"-" "$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID" \
|
|
||||||
"Pico 1.0 API Documentation ($TRAVIS_TAG)"
|
|
||||||
[ $? -eq 0 ] || exit 1
|
|
||||||
|
|
||||||
# deploy phpDocs
|
# generate phpDocs
|
||||||
deploy-phpdoc.sh \
|
if [ "$DEPLOY_PHPDOC_RELEASES" == "true" ]; then
|
||||||
"Update phpDocumentor class docs for $TRAVIS_TAG" \
|
generate-phpdoc.sh \
|
||||||
"$TRAVIS_REPO_SLUG" "tags/$TRAVIS_TAG" "$TRAVIS_COMMIT"
|
"$TRAVIS_BUILD_DIR/.phpdoc.xml" \
|
||||||
|
"-" "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID" \
|
||||||
|
"Pico 1.0 API Documentation ($TRAVIS_TAG)"
|
||||||
|
[ $? -eq 0 ] || exit 1
|
||||||
|
|
||||||
|
# commit phpDocs
|
||||||
|
if [ -n "$(git status --porcelain "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID")" ]; then
|
||||||
|
echo "Committing phpDoc changes..."
|
||||||
|
git add "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID"
|
||||||
|
git commit \
|
||||||
|
--message="Update phpDocumentor class docs for $TRAVIS_TAG" \
|
||||||
|
"$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID"
|
||||||
|
[ $? -eq 0 ] || exit 1
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# update version badge
|
||||||
|
if [ "$DEPLOY_VERSION_BADGE" == "true" ]; then
|
||||||
|
generate-badge.sh \
|
||||||
|
"$DEPLOYMENT_DIR/badges/pico-version.svg" \
|
||||||
|
"release" "$TRAVIS_TAG" "blue"
|
||||||
|
|
||||||
|
# commit version badge
|
||||||
|
echo "Committing changes..."
|
||||||
|
git add "$DEPLOYMENT_DIR/badges/pico-version.svg"
|
||||||
|
git commit \
|
||||||
|
--message="Update version badge for $TRAVIS_TAG" \
|
||||||
|
"$DEPLOYMENT_DIR/badges/pico-version.svg"
|
||||||
|
[ $? -eq 0 ] || exit 1
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
# deploy
|
||||||
|
github-deploy.sh "$TRAVIS_REPO_SLUG" "tags/$TRAVIS_TAG" "$TRAVIS_COMMIT"
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
55
_build/generate-badge.sh
Executable file
55
_build/generate-badge.sh
Executable file
@ -0,0 +1,55 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
##
|
||||||
|
# Downloads a custom badge from shields.io
|
||||||
|
#
|
||||||
|
# All credit goes to the awesome guys at shields.io!
|
||||||
|
#
|
||||||
|
# @see http://shields.io/
|
||||||
|
#
|
||||||
|
# @author Daniel Rudolf
|
||||||
|
# @link http://picocms.org
|
||||||
|
# @license http://opensource.org/licenses/MIT
|
||||||
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# parameters
|
||||||
|
BADGE_FILE_PATH="$1" # target file path
|
||||||
|
BADGE_SUBJECT="$2" # subject (left half) of the badge
|
||||||
|
BADGE_STATUS="$3" # status (right half) of the badge
|
||||||
|
BADGE_COLOR="$4" # color of the badge
|
||||||
|
|
||||||
|
# print parameters
|
||||||
|
echo "Generating badge..."
|
||||||
|
printf 'BADGE_FILE_PATH="%s"\n' "$BADGE_FILE_PATH"
|
||||||
|
printf 'BADGE_SUBJECT="%s"\n' "$BADGE_SUBJECT"
|
||||||
|
printf 'BADGE_STATUS="%s"\n' "$BADGE_STATUS"
|
||||||
|
printf 'BADGE_COLOR="%s"\n' "$BADGE_COLOR"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# download badge from shields.io
|
||||||
|
printf 'Downloading badge...\n'
|
||||||
|
TMP_BADGE="$(mktemp -u)"
|
||||||
|
|
||||||
|
curl --location --output "$TMP_BADGE" \
|
||||||
|
"https://img.shields.io/badge/$BADGE_SUBJECT-$BADGE_STATUS-$BADGE_COLOR.svg"
|
||||||
|
|
||||||
|
# validate badge
|
||||||
|
if [ ! -f "$TMP_BADGE" ] || [ ! -s "$TMP_BADGE" ]; then
|
||||||
|
echo "Unable to generate badge; skipping..." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# MIME type image/svg+xml isn't supported at the moment
|
||||||
|
#
|
||||||
|
#TMP_BADGE_MIME="$(file --mime-type "$TMP_BADGE" | cut -d ' ' -f 2)"
|
||||||
|
#if [ "$TMP_BADGE_MIME" != "image/svg+xml" ]; then
|
||||||
|
# echo "Generated badge should be of type 'image/svg+xml', '$TMP_BADGE_MIME' given; aborting...\n" >&2
|
||||||
|
# exit 1
|
||||||
|
#fi
|
||||||
|
|
||||||
|
# deploy badge
|
||||||
|
mv "$TMP_BADGE" "$BADGE_FILE_PATH"
|
||||||
|
|
||||||
|
echo
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
##
|
##
|
||||||
# Deploys phpDoc class documentation
|
# Pushes commits to a GitHub repo
|
||||||
#
|
#
|
||||||
# @author Daniel Rudolf
|
# @author Daniel Rudolf
|
||||||
# @link http://picocms.org
|
# @link http://picocms.org
|
||||||
@ -10,52 +10,31 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# environment variables
|
|
||||||
# GITHUB_OAUTH_TOKEN GitHub authentication token, see https://github.com/settings/tokens
|
|
||||||
|
|
||||||
# parameters
|
# parameters
|
||||||
COMMIT_MESSAGE="$1" # commit message
|
CHECK_REPO_SLUG="$1" # optional GitHub repo (e.g. picocms/Pico) to check
|
||||||
CHECK_REPO_SLUG="$2" # optional GitHub repo (e.g. picocms/Pico) to check
|
|
||||||
# its latest commit as basic race condition protection
|
# its latest commit as basic race condition protection
|
||||||
CHECK_REMOTE_REF="$3" # optional remote Git reference (e.g. heads/master)
|
CHECK_REMOTE_REF="$2" # optional remote Git reference (e.g. heads/master)
|
||||||
CHECK_LOCAL_COMMIT="$4" # optional local commit SHA1
|
CHECK_LOCAL_COMMIT="$3" # optional local commit SHA1
|
||||||
|
|
||||||
# print parameters
|
# print parameters
|
||||||
echo "Deploying phpDocs..."
|
echo "Deploying repo..."
|
||||||
printf 'COMMIT_MESSAGE="%s"\n' "$COMMIT_MESSAGE"
|
|
||||||
printf 'CHECK_REPO_SLUG="%s"\n' "$CHECK_REPO_SLUG"
|
printf 'CHECK_REPO_SLUG="%s"\n' "$CHECK_REPO_SLUG"
|
||||||
printf 'CHECK_REMOTE_REF="%s"\n' "$CHECK_REMOTE_REF"
|
printf 'CHECK_REMOTE_REF="%s"\n' "$CHECK_REMOTE_REF"
|
||||||
printf 'CHECK_LOCAL_COMMIT="%s"\n' "$CHECK_LOCAL_COMMIT"
|
printf 'CHECK_LOCAL_COMMIT="%s"\n' "$CHECK_LOCAL_COMMIT"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# check for changes
|
# check for changes
|
||||||
if [ -z "$(git status --porcelain)" ]; then
|
if [ -z "$(git log --oneline '@{upstream}..')" ]; then
|
||||||
printf 'Nothing to deploy; skipping...\n\n'
|
printf 'Nothing to deploy; skipping...\n\n'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# setup git
|
|
||||||
printf 'Preparing repo...\n'
|
|
||||||
git config push.default simple
|
|
||||||
git config user.name "Travis CI"
|
|
||||||
git config user.email "travis-ci@picocms.org"
|
|
||||||
|
|
||||||
if [ -n "$GITHUB_OAUTH_TOKEN" ]; then
|
|
||||||
git config credential.helper 'store --file=.git/credentials'
|
|
||||||
(umask 077 && echo "https://GitHub:$GITHUB_OAUTH_TOKEN@github.com" > .git/credentials)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# commit changes
|
|
||||||
printf '\nCommiting changes...\n'
|
|
||||||
git add --all
|
|
||||||
git commit --message="$COMMIT_MESSAGE"
|
|
||||||
|
|
||||||
# race condition protection for concurrent Travis builds
|
# race condition protection for concurrent Travis builds
|
||||||
# this is no definite protection (race conditions are still possible during `git push`),
|
# this is no definite protection (race conditions are still possible during `git push`),
|
||||||
# but it should give a basic protection without disabling concurrent builds completely
|
# but it should give a basic protection without disabling concurrent builds completely
|
||||||
if [ -n "$CHECK_REPO_SLUG" ] && [ -n "$CHECK_REMOTE_REF" ] && [ -n "$CHECK_LOCAL_COMMIT" ]; then
|
if [ -n "$CHECK_REPO_SLUG" ] && [ -n "$CHECK_REMOTE_REF" ] && [ -n "$CHECK_LOCAL_COMMIT" ]; then
|
||||||
# retrieve information using GitHub APIv3
|
# retrieve information using GitHub APIv3
|
||||||
printf '\nChecking latest commit...\n'
|
printf 'Checking latest commit...\n'
|
||||||
CHECK_API_URL="https://api.github.com/repos/$CHECK_REPO_SLUG/git/refs/$CHECK_REMOTE_REF"
|
CHECK_API_URL="https://api.github.com/repos/$CHECK_REPO_SLUG/git/refs/$CHECK_REMOTE_REF"
|
||||||
if [ -n "$GITHUB_OAUTH_TOKEN" ]; then
|
if [ -n "$GITHUB_OAUTH_TOKEN" ]; then
|
||||||
CHECK_API_RESPONSE="$(wget -O- --header="Authorization: token $GITHUB_OAUTH_TOKEN" "$CHECK_API_URL" 2> /dev/null)"
|
CHECK_API_RESPONSE="$(wget -O- --header="Authorization: token $GITHUB_OAUTH_TOKEN" "$CHECK_API_URL" 2> /dev/null)"
|
||||||
@ -77,13 +56,15 @@ if [ -n "$CHECK_REPO_SLUG" ] && [ -n "$CHECK_REMOTE_REF" ] && [ -n "$CHECK_LOCAL
|
|||||||
|
|
||||||
# compare source reference against the latest commit
|
# compare source reference against the latest commit
|
||||||
if [ "$CHECK_REMOTE_COMMIT" != "$CHECK_LOCAL_COMMIT" ]; then
|
if [ "$CHECK_REMOTE_COMMIT" != "$CHECK_LOCAL_COMMIT" ]; then
|
||||||
echo "WARNING: latest local commit '$CHECK_LOCAL_COMMIT' doesn't match latest remote commit '$CHECK_REMOTE_COMMIT'" >&2
|
echo "Latest local commit '$CHECK_LOCAL_COMMIT' doesn't match latest remote commit '$CHECK_REMOTE_COMMIT'; aborting..." >&2
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# push changes
|
# push changes
|
||||||
printf '\nPushing changes...\n'
|
printf 'Pushing changes...\n'
|
||||||
git push origin
|
git push
|
||||||
|
|
||||||
echo
|
echo
|
37
_build/github-setup.sh
Executable file
37
_build/github-setup.sh
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
##
|
||||||
|
# Prepares a GitHub repo for deployment
|
||||||
|
#
|
||||||
|
# @author Daniel Rudolf
|
||||||
|
# @link http://picocms.org
|
||||||
|
# @license http://opensource.org/licenses/MIT
|
||||||
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# environment variables
|
||||||
|
# GITHUB_OAUTH_TOKEN GitHub authentication token, see https://github.com/settings/tokens
|
||||||
|
|
||||||
|
# print "parameters" (we don't have any)
|
||||||
|
echo "Setup repo..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# check for git repo
|
||||||
|
if ! git rev-parse --git-dir > /dev/null 2>&1; then
|
||||||
|
echo "Not a git repo; aborting..." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# setup git
|
||||||
|
printf 'Preparing repo...\n'
|
||||||
|
git config push.default simple
|
||||||
|
git config user.name "Travis CI"
|
||||||
|
git config user.email "travis-ci@picocms.org"
|
||||||
|
|
||||||
|
if [ -n "$GITHUB_OAUTH_TOKEN" ]; then
|
||||||
|
git config credential.helper 'store --file=.git/credentials'
|
||||||
|
(umask 077 && echo "https://GitHub:$GITHUB_OAUTH_TOKEN@github.com" > .git/credentials)
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
Loading…
x
Reference in New Issue
Block a user