Skip to content

Commit

Permalink
refactor: update version tag during release packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
linfan committed May 21, 2022
1 parent a2f9cc0 commit ee1327a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 18 deletions.
23 changes: 13 additions & 10 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
output
.github
.git
docs
# IDE files
*.iml
.idea/
.vscode/

.vscode
bin
# Unused files
output/
.github/
.git/
docs/
testing/
cmd/
pkg/
hack/
.DS_Store

# web build and modules
web/build
web/node_modules
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
*.iml
.idea/
.vscode/
.jvmrc
.DS_Store

# Generated files
vendor/
Expand All @@ -12,3 +10,5 @@ artifacts/
dist/
node_modules/
note/
.jvmrc
.DS_Store
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ test:
go test -v -cover -coverprofile artifacts/report/coverage/c.out ./...
go tool cover -html=artifacts/report/coverage/c.out -o artifacts/report/coverage/index.html

# build kt project
compile:
# build kt release package
release:
goreleaser --snapshot --skip-publish --rm-dist

# check the style
Expand Down Expand Up @@ -67,4 +67,4 @@ navigator-local:

# clean up workspace
clean:
rm -fr artifacts dist
rm -fr artifacts output dist
6 changes: 3 additions & 3 deletions build/scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

for f in `ls build/docker`; do
mkdir -p artifacts/docker/${f}
cp -f build/docker/${f}/Dockerfile artifacts/docker/${f}/Dockerfile
cp -f "build/docker/${f}/Dockerfile" "artifacts/docker/${f}/Dockerfile"
if ! which gsed 2>&1 >/dev/null; then
# Linux
sed -i 's#COPY artifacts/[a-z0-1]\+/#COPY #' artifacts/docker/${f}/Dockerfile
sed -i 's#COPY artifacts/[a-z0-1]\+/#COPY #' "artifacts/docker/${f}/Dockerfile"
else
# MacOS
gsed -i 's#COPY artifacts/[a-z0-1]\+/#COPY #' artifacts/docker/${f}/Dockerfile
gsed -i 's#COPY artifacts/[a-z0-1]\+/#COPY #' "artifacts/docker/${f}/Dockerfile"
fi
done
7 changes: 7 additions & 0 deletions build/scripts/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Update version tag of Makefile

if [ "${1}" != "" ]; then
sed -i "/^TAG/s/dev/${1}/"
else
echo "TAG should not be empty"
fi

0 comments on commit ee1327a

Please sign in to comment.