erp-platform/configs/deployment/scripts/build/api.sh
2026-01-07 01:25:30 +03:00

21 lines
785 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cd ~/erp-platform
git checkout main
git fetch && git pull
cd ~/erp-platform/api
VERSION=$(cat ~/erp-platform/api/src/Erp.Platform.HttpApi.Host/appsettings.json \
| grep -o '"[^"]*"\s*:\s*"[^"]*"' \
| grep -E '^"(Version)"' \
| sed 's/^.* //' \
| sed 's/"//g')
# DevExpress lisansını dosyadan oku (GitHub'a commit edilmemiş)
DEVEXPRESS_LICENSE=$(cat ~/erp-platform/api/DevExpress_License.txt 2>/dev/null || echo "")
docker build \
--build-arg DevExpress_License="${DEVEXPRESS_LICENSE}" \
-t devops.sozsoft.com/sozsoft/erp-platform-api:${VERSION} \
-t devops.sozsoft.com/sozsoft/erp-platform-api:latest \
-f Erp.Platform.HttpApi.Host.Dockerfile .
docker push devops.sozsoft.com/sozsoft/erp-platform-api:${VERSION}
docker push devops.sozsoft.com/sozsoft/erp-platform-api:latest