-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add serilog to spell checker * correct spelling * combine writes * update deps * log version on startup * exclude .env * add versioning tool * add publish script
- Loading branch information
Showing
12 changed files
with
114 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"dotnet-version-cli": { | ||
"version": "3.0.3", | ||
"commands": [ | ||
"dotnet-version" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -488,4 +488,5 @@ array_layout_x.json | |
appsettings.local.json | ||
appsettings.docker.json | ||
compose.override.yaml | ||
.mono | ||
.mono | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"Anar", | ||
"appsettings", | ||
"Arien", | ||
"Enphase" | ||
"Enphase", | ||
"Serilog" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
export $(grep -v '^#' .env | xargs) | ||
|
||
PROJECT_FILE="Anar/Anar.csproj" | ||
VERSION=$(grep -oPm1 "(?<=Version>)[^<]+" "${PROJECT_FILE}" | xargs) | ||
if [ -z "${VERSION}" ]; then | ||
echo "Unable to determine application version." | ||
exit 1 | ||
fi | ||
|
||
LATEST_NAME="anar:latest" | ||
IMAGE_NAME="anar:${VERSION}" | ||
|
||
echo "Build ${IMAGE_NAME}" | ||
docker build -t "${LATEST_NAME}" -f "Anar/Dockerfile" "Anar" | ||
|
||
if [ -z "${APP_REGISTRY}" ]; then | ||
echo "Registry has not been set. Image will not be published." | ||
else | ||
docker tag "${LATEST_NAME}" "${APP_REGISTRY}/${IMAGE_NAME}" | ||
docker tag "${LATEST_NAME}" "${APP_REGISTRY}/${LATEST_NAME}" | ||
docker push "${APP_REGISTRY}/${IMAGE_NAME}" | ||
docker push "${APP_REGISTRY}/${LATEST_NAME}" | ||
fi |