Skip to content

Commit f3b7c4d

Browse files
committed
fix: 🐛 enhance Docker wrapper setup
1 parent c34099b commit f3b7c4d

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/gitversion/_gv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

33
# Call the GitVersion tool with the specified configuration
4-
/usr/local/bin/dotnet-gitversion $(git rev-parse --show-toplevel) -config ".gitversion" "$@"
4+
#/usr/local/bin/dotnet-gitversion $(git rev-parse --show-toplevel) -config ".gitversion" "$@"
55
/usr/local/bin/docker-gitversion $(git rev-parse --show-toplevel) -config ".gitversion" "$@"
66

src/gitversion/install-tools.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ set -e
44
### Install GitVersion
55
zz_log i "Install Gitversion..."
66
#dotnet tool install GitVersion.Tool --version ${VERSION:-5.*} --tool-path /usr/local/bin
7+
8+
### Get Docker GitVersion image
9+
zz_log i "Pull Gitversion Docker image..."
10+
docker pull gittools/gitversion:${VERSION:-6.5.1}
11+
12+
### Create Docker GitVersion wrapper
13+
zz_log i "Create Docker Gitversion wrapper..."
714
(
8-
echo "#!/bin/sh"
9-
echo "repo=\${1:-\$(pwd)}; shift;"
10-
echo "docker run --rm -v \"\$repo:/repo\" gittools/gitversion:${VERSION:-6.5.1} /repo \"$@\""
15+
echo "#!/bin/sh"
16+
echo "repo=\${1:-\$(pwd)}; shift;"
17+
echo "docker run --rm -v \"\$repo:/repo\" gittools/gitversion:${VERSION:-6.5.1} /repo \"$@\""
1118
) > /usr/local/bin/docker-gitversion && chmod ugo+x /usr/local/bin/docker-gitversion
1219

1320

0 commit comments

Comments
 (0)