Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ WORKDIR /repo
# https://code-maze.com/aspnetcore-app-dockerfiles/
COPY ./*.sln ./

COPY ./build/ ./build/

COPY ./src/*/*.csproj ./src/
RUN for file in $(ls src/*.csproj); do mkdir -p ./${file%.*}/ && mv $file ./${file%.*}/; done

COPY ./tests/*/*.csproj ./tests/
RUN for file in $(ls tests/*.csproj); do mkdir -p ./${file%.*}/ && mv $file ./${file%.*}/; done

RUN dotnet restore
RUN find src -name "*.csproj" | xargs -n1 dotnet restore && \
find tests -name "*.csproj" | xargs -n1 dotnet restore

COPY ./assets ./assets/

Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env bash
set -eo pipefail

docker build --tag sss-build .
docker run --rm --name sss-build \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD/artifacts:/repo/artifacts \
-v $PWD/.git:/repo/.git \
--network host \
-e FEEDZ_SSS_API_KEY=$FEEDZ_SSS_API_KEY \
-e FEEDZ_SSS_API_KEY=${FEEDZ_SSS_API_KEY} \
sss-build \
dotnet run -p /repo/build/build.csproj -- "$@"