This repository was archived by the owner on Feb 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 15 files changed +270
-2
lines changed Expand file tree Collapse file tree 15 files changed +270
-2
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "conventionalCommits.scopes" : [
3+ " README"
4+ ]
5+ }
Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ USER avd
6262COPY --from=BUILDER /home/avd/.local/ /home/avd/.local
6363ENV PATH=$PATH:/home/avd/.local/bin
6464
65+ # Copy gitconfig file
66+ COPY gitconfig /home/avd/.gitconfig
67+
6568# Install Oh My ZSH to provide improved shell
6669RUN wget --quiet https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true \
6770 && echo 'plugins=(ansible common-aliases safe-paste git jsontools history git-extras)' >> $HOME/.zshrc \
Original file line number Diff line number Diff line change 33DOCKER_SOCKET=/var/run/docker.sock
44DOCKER_GROUP=docker
55USER=avd
6+ HOME_AVD=/home/avd/
67
78# Install specific requirement file
89if [ ! -z " ${AVD_REQUIREMENTS} " ]; then
@@ -33,6 +34,22 @@ if [ ! -z "${AVD_GID}" ]; then
3334 groupmod -g ${AVD_GID} avd
3435fi
3536
37+ # Update gitconfig with username and email
38+ if [ -n " ${AVD_GIT_USER} " ]; then
39+ echo " Update gitconfig with ${AVD_GIT_USER} "
40+ sed -i " s/USERNAME/${AVD_GIT_USER} /g" ${HOME_AVD} /.gitconfig
41+ else
42+ echo " Update gitconfig with default username"
43+ sed -i " s/USERNAME/AVD Base USER/g" ${HOME_AVD} /.gitconfig
44+ fi
45+ if [ -n " ${AVD_GIT_EMAIL} " ]; then
46+ echo " Update gitconfig with ${AVD_GIT_EMAIL} "
47+ sed -i " s/USER_EMAIL/${AVD_GIT_EMAIL} /g" ${HOME_AVD} /.gitconfig
48+ else
49+ echo " Update gitconfig with default email"
50+ sed -i
" s/USER_EMAIL/[email protected] /g" ${HOME_AVD} /.gitconfig
51+ fi
52+
3653if [ -S ${DOCKER_SOCKET} ]; then
3754 sudo chmod 666 /var/run/docker.sock & > /dev/null
3855fi
Original file line number Diff line number Diff line change 1+ [user]
2+ name = USERNAME
3+ email = USER_EMAIL
4+ [alias]
5+ # Generic command
6+ rollback = reset --hard
7+ recommit = commit --amend --no-edit
8+ commit-unsafe = commit --no-verify
9+ undo = reset HEAD~1 --mixed
10+ uncommit = reset --soft HEAD~1
11+
12+ # Misc command
13+ refresh = !git pull --rebase --prune $@
14+ conflicts = !git ls-files -u | cut -f 2 | sort -u
15+ push-current = push -u origin HEAD
16+
17+ # Logging & History
18+ last = log --stat -1 HEAD
19+ graph = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
20+ logs = log --oneline --decorate --color
21+
22+ # In Fork model
23+ forigin = fetch origin
24+ fupstream = fetch upstream
25+ fetch-all = !sh -c 'for remote in $(git remote);do git fetch remote;done'
26+
27+ [core]
28+ excludesfile = ~/.gitignore_global
29+ [commit]
30+ template = ~/.stCommitMsg
31+ [pull]
32+ rebase = true
33+ [filter "lfs"]
34+ clean = git-lfs clean -- %f
35+ smudge = git-lfs smudge -- %f
36+ process = git-lfs filter-process
37+ required = true
38+ [pager]
39+ branch = false
Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ USER avd
6161COPY --from=BUILDER /home/avd/.local/ /home/avd/.local
6262ENV PATH=$PATH:/home/avd/.local/bin
6363
64+ # Copy gitconfig file
65+ COPY gitconfig /home/avd/.gitconfig
66+
6467# Install Oh My ZSH to provide improved shell
6568RUN wget --quiet https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true \
6669 && echo 'plugins=(ansible common-aliases safe-paste git jsontools history git-extras)' >> $HOME/.zshrc \
Original file line number Diff line number Diff line change 33DOCKER_SOCKET=/var/run/docker.sock
44DOCKER_GROUP=docker
55USER=avd
6+ HOME_AVD=/home/avd/
67
78# Install specific requirement file
89if [ ! -z " ${AVD_REQUIREMENTS} " ]; then
@@ -33,6 +34,22 @@ if [ ! -z "${AVD_GID}" ]; then
3334 groupmod -g ${AVD_GID} avd
3435fi
3536
37+ # Update gitconfig with username and email
38+ if [ -n " ${AVD_GIT_USER} " ]; then
39+ echo " Update gitconfig with ${AVD_GIT_USER} "
40+ sed -i " s/USERNAME/${AVD_GIT_USER} /g" ${HOME_AVD} /.gitconfig
41+ else
42+ echo " Update gitconfig with default username"
43+ sed -i " s/USERNAME/AVD Base USER/g" ${HOME_AVD} /.gitconfig
44+ fi
45+ if [ -n " ${AVD_GIT_EMAIL} " ]; then
46+ echo " Update gitconfig with ${AVD_GIT_EMAIL} "
47+ sed -i " s/USER_EMAIL/${AVD_GIT_EMAIL} /g" ${HOME_AVD} /.gitconfig
48+ else
49+ echo " Update gitconfig with default email"
50+ sed -i
" s/USER_EMAIL/[email protected] /g" ${HOME_AVD} /.gitconfig
51+ fi
52+
3653if [ -S ${DOCKER_SOCKET} ]; then
3754 sudo chmod 666 /var/run/docker.sock & > /dev/null
3855fi
Original file line number Diff line number Diff line change 1+ [user]
2+ name = USERNAME
3+ email = USER_EMAIL
4+ [alias]
5+ # Generic command
6+ rollback = reset --hard
7+ recommit = commit --amend --no-edit
8+ commit-unsafe = commit --no-verify
9+ undo = reset HEAD~1 --mixed
10+ uncommit = reset --soft HEAD~1
11+
12+ # Misc command
13+ refresh = !git pull --rebase --prune $@
14+ conflicts = !git ls-files -u | cut -f 2 | sort -u
15+ push-current = push -u origin HEAD
16+
17+ # Logging & History
18+ last = log --stat -1 HEAD
19+ graph = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
20+ logs = log --oneline --decorate --color
21+
22+ # In Fork model
23+ forigin = fetch origin
24+ fupstream = fetch upstream
25+ fetch-all = !sh -c 'for remote in $(git remote);do git fetch remote;done'
26+
27+ [core]
28+ excludesfile = ~/.gitignore_global
29+ [commit]
30+ template = ~/.stCommitMsg
31+ [pull]
32+ rebase = true
33+ [filter "lfs"]
34+ clean = git-lfs clean -- %f
35+ smudge = git-lfs smudge -- %f
36+ process = git-lfs filter-process
37+ required = true
38+ [pager]
39+ branch = false
Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ USER avd
6161COPY --from=BUILDER /home/avd/.local/ /home/avd/.local
6262ENV PATH=$PATH:/home/avd/.local/bin
6363
64+ # Copy gitconfig file
65+ COPY gitconfig /home/avd/.gitconfig
66+
6467# Install Oh My ZSH to provide improved shell
6568RUN wget --quiet https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true \
6669 && echo 'plugins=(ansible common-aliases safe-paste git jsontools history git-extras)' >> $HOME/.zshrc \
Original file line number Diff line number Diff line change 33DOCKER_SOCKET=/var/run/docker.sock
44DOCKER_GROUP=docker
55USER=avd
6+ HOME_AVD=/home/avd/
67
78# Install specific requirement file
89if [ ! -z " ${AVD_REQUIREMENTS} " ]; then
@@ -33,6 +34,22 @@ if [ ! -z "${AVD_GID}" ]; then
3334 groupmod -g ${AVD_GID} avd
3435fi
3536
37+ # Update gitconfig with username and email
38+ if [ -n " ${AVD_GIT_USER} " ]; then
39+ echo " Update gitconfig with ${AVD_GIT_USER} "
40+ sed -i " s/USERNAME/${AVD_GIT_USER} /g" ${HOME_AVD} /.gitconfig
41+ else
42+ echo " Update gitconfig with default username"
43+ sed -i " s/USERNAME/AVD Base USER/g" ${HOME_AVD} /.gitconfig
44+ fi
45+ if [ -n " ${AVD_GIT_EMAIL} " ]; then
46+ echo " Update gitconfig with ${AVD_GIT_EMAIL} "
47+ sed -i " s/USER_EMAIL/${AVD_GIT_EMAIL} /g" ${HOME_AVD} /.gitconfig
48+ else
49+ echo " Update gitconfig with default email"
50+ sed -i
" s/USER_EMAIL/[email protected] /g" ${HOME_AVD} /.gitconfig
51+ fi
52+
3653if [ -S ${DOCKER_SOCKET} ]; then
3754 sudo chmod 666 /var/run/docker.sock & > /dev/null
3855fi
Original file line number Diff line number Diff line change 1+ [user]
2+ name = USERNAME
3+ email = USER_EMAIL
4+ [alias]
5+ # Generic command
6+ rollback = reset --hard
7+ recommit = commit --amend --no-edit
8+ commit-unsafe = commit --no-verify
9+ undo = reset HEAD~1 --mixed
10+ uncommit = reset --soft HEAD~1
11+
12+ # Misc command
13+ refresh = !git pull --rebase --prune $@
14+ conflicts = !git ls-files -u | cut -f 2 | sort -u
15+ push-current = push -u origin HEAD
16+
17+ # Logging & History
18+ last = log --stat -1 HEAD
19+ graph = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
20+ logs = log --oneline --decorate --color
21+
22+ # In Fork model
23+ forigin = fetch origin
24+ fupstream = fetch upstream
25+ fetch-all = !sh -c 'for remote in $(git remote);do git fetch remote;done'
26+
27+ [core]
28+ excludesfile = ~/.gitignore_global
29+ [commit]
30+ template = ~/.stCommitMsg
31+ [pull]
32+ rebase = true
33+ [filter "lfs"]
34+ clean = git-lfs clean -- %f
35+ smudge = git-lfs smudge -- %f
36+ process = git-lfs filter-process
37+ required = true
38+ [pager]
39+ branch = false
You can’t perform that action at this time.
0 commit comments