sozsoft-platform/configs/deployment/scripts/build/api.sh
2026-08-13 00:26:36 +03:00

27 lines
1.2 KiB
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 ~/sozsoft-platform
git checkout main
# --tags --force: sürüm notları git tag'lerinden üretiliyor; yerel tag origin'den
# farklı commit'e bakıyorsa --force olmadan reddedilir ve yeni tag'ler gelmez.
git fetch --prune --prune-tags --tags --force && git pull
cd ~/sozsoft-platform/api
# Sürüm notları git tag'lerinden üretilir ve API imajına gömülür; uygulama
# açılışta bunları veritabanına senkronize eder (DbMigrator gerekmez).
./scripts/generate-release-notes.sh
VERSION=$(cat ~/sozsoft-platform/api/src/Sozsoft.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 ~/sozsoft-platform/api/DevExpress_License.txt 2>/dev/null || echo "")
docker build \
--build-arg DevExpress_License="${DEVEXPRESS_LICENSE}" \
-t devops.sozsoft.com/sozsoft/sozsoft-platform-api:${VERSION} \
-t devops.sozsoft.com/sozsoft/sozsoft-platform-api:latest \
-f Sozsoft.Platform.HttpApi.Host.Dockerfile .
docker push devops.sozsoft.com/sozsoft/sozsoft-platform-api:${VERSION}
docker push devops.sozsoft.com/sozsoft/sozsoft-platform-api:latest