mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-12 01:12:27 +08:00
refactor: eiblog
This commit is contained in:
24
scripts/run_build.sh
Executable file
24
scripts/run_build.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -e
|
||||
|
||||
_registry="$1"
|
||||
_tag="$2"
|
||||
|
||||
if [ -z "$_registry" ] || [ -z "$_tag" ]; then
|
||||
echo "Please specify image repository and tag."
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# prepare dir ./bin
|
||||
mkdir -p ./bin
|
||||
|
||||
# build demo app
|
||||
for file in pkg/core/*; do
|
||||
app="$(basename $file)";
|
||||
GOOS=linux GOARCH=amd64 go build -o bin/backend "./cmd/$app"
|
||||
docker build -f "build/package/$app.Dockerfile" -t "$_registry/$app:$_tag" .
|
||||
done
|
||||
|
||||
# clean dir ./bin
|
||||
rm -rf ./bin
|
||||
Reference in New Issue
Block a user