fix issue with missing author and email
This commit is contained in:
parent
6783f72b40
commit
7a6564cc28
24
README.md
Normal file
24
README.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# drone-git
|
||||||
|
|
||||||
|
Drone plugin to clone `git` repositories.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
Build the Docker image with the following commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build --rm -f docker/Dockerfile.linux.amd64 -t drone/git .
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Clone a commit:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run --rm \
|
||||||
|
-e DRONE_REMOTE_URL=https://github.com/drone/envsubst.git \
|
||||||
|
-e DRONE_BUILD_EVENT=push \
|
||||||
|
-e DRONE_COMMIT_SHA=15e3f9b7e16332eee3bbdff9ef31f95d23c5da2c \
|
||||||
|
-e DRONE_COMMIT_BRANCH=master \
|
||||||
|
drone/git
|
||||||
|
```
|
17
posix/clone
17
posix/clone
@ -32,10 +32,19 @@ fi
|
|||||||
# configure git global behavior and parameters via the
|
# configure git global behavior and parameters via the
|
||||||
# following environment variables:
|
# following environment variables:
|
||||||
|
|
||||||
export GIT_AUTHOR_NAME=${DRONE_COMMIT_AUTHOR_NAME=drone}
|
|
||||||
export GIT_AUTHOR_EMAIL=${DRONE_COMMIT_AUTHOR_EMAIL=drone@localhost}
|
if [[ -z "${GIT_AUTHOR_NAME}" ]]; then
|
||||||
export GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME}
|
export DRONE_COMMIT_AUTHOR_NAME=drone
|
||||||
export GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL}
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${GIT_AUTHOR_EMAIL}" ]]; then
|
||||||
|
export DRONE_COMMIT_AUTHOR_EMAIL=drone@localhost
|
||||||
|
fi
|
||||||
|
|
||||||
|
export GIT_AUTHOR_NAME=${DRONE_COMMIT_AUTHOR_NAME}
|
||||||
|
export GIT_AUTHOR_EMAIL=${DRONE_COMMIT_AUTHOR_EMAIL}
|
||||||
|
export GIT_COMMITTER_NAME=${DRONE_COMMIT_AUTHOR_NAME}
|
||||||
|
export GIT_COMMITTER_EMAIL=${DRONE_COMMIT_AUTHOR_EMAIL}
|
||||||
# GIT_SSL_NO_VERIFY=
|
# GIT_SSL_NO_VERIFY=
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,4 +17,4 @@ git fetch ${FLAGS} origin +refs/heads/${DRONE_COMMIT_BRANCH}:
|
|||||||
git checkout ${DRONE_COMMIT_BRANCH}
|
git checkout ${DRONE_COMMIT_BRANCH}
|
||||||
|
|
||||||
git fetch origin ${DRONE_COMMIT_REF}:
|
git fetch origin ${DRONE_COMMIT_REF}:
|
||||||
git rebase ${DRONE_COMMIT_SHA}
|
git merge ${DRONE_COMMIT_SHA}
|
||||||
|
Loading…
Reference in New Issue
Block a user