@@ -18,7 +18,7 @@ ARG --global IB_CONFIGURATION=Release
1818# initialize installs build dependencies and packages
1919initialize:
2020 # Dotnet tools and scripts installed by PSGet
21- ENV PATH=$HOME/.dotnet/tools:$HOME/.local/share/powershell/Scripts:$PATH
21+ ENV PATH=$HOME/.dotnet/tools:$HOME/.local/share/powershell/Scripts:$PATH:${IB_TASK_ROOT}/scripts
2222 RUN mkdir $IB_TASK_ROOT $IB_OUTPUT_ROOT $IB_RESULTS_ROOT $IB_TEMP_ROOT \
2323 && git config --global user.email "Jaykul@HuddledMasses.org" \
2424 && git config --global user.name "Earth Build"
@@ -30,24 +30,16 @@ initialize:
3030 COPY --if-exists dotnet-tools.json .
3131 COPY --if-exists .config/dotnet-tools.json .
3232 # COPY --if-exists **/*.csproj .
33- RUN -- pwsh -File "${IB_TASK_ROOT}/scripts/Invoke-Build.ps1" Initialize
34-
35- # version calculates the version
36- version:
37- FROM +initialize
38- # Copy .git because we use GitVersion in the build to calculate the version
39- COPY .git .
40- COPY GitVersion.yml .
41- RUN -- pwsh -File "${IB_TASK_ROOT}/scripts/Invoke-Build.ps1" Get-Version
33+ RUN ["pwsh", "-CommandWithArgs", "Invoke-Build Initialize"]
4234
4335# build produces the main output but does not package or test it
4436build:
4537 # These are defined to make them available as information for the build scripts
4638 ARG EARTHLY_GIT_BRANCH
47- FROM +version
39+ FROM +initialize
4840 # make sure you have output folders (like bin, obj, Modules) in .earthlyignore
4941 COPY . .
50- RUN -- pwsh -File "${IB_TASK_ROOT}/scripts/ Invoke-Build.ps1" Build
42+ RUN [" pwsh", "-CommandWithArgs", " Invoke-Build Build, Pack"]
5143
5244 # SAVE ARTIFACT [--keep-ts] [--keep-own] [--if-exists] [--force] <src> [<artifact-dest-path>] [AS LOCAL <local-path>]
5345 SAVE ARTIFACT $IB_OUTPUT_ROOT/$IB_MODULE_NAME AS LOCAL ./output/$IB_MODULE_NAME
5749 ARG EARTHLY_GIT_BRANCH
5850 BUILD +build
5951 FROM +build
60- RUN -- pwsh -File "${IB_TASK_ROOT}/scripts/ Invoke-Build.ps1" Test
52+ RUN [" pwsh", "-CommandWithArgs", " Invoke-Build Test"]
6153 SAVE ARTIFACT $IB_RESULTS_ROOT AS LOCAL ./output$IB_RESULTS_ROOT
6254
6355# publish runs publish and push tasks if the tests pass and --push was specified.
6759 # If we only reference with FROM (or COPY) the outputs will not be produced
6860 BUILD +test
6961 FROM +build
70- RUN --push --secret IB_PS_PUBLISH_KEY \
71- -- pwsh -Command "${IB_TASK_ROOT}/scripts/ Invoke-Build.ps1" "Publish, Push" -Verbose
62+ RUN --push --secret IB_PS_PUBLISH_KEY --secret GITHUB_TOKEN \
63+ -- pwsh -CommandWithArgs " Invoke-Build Push" -Verbose
0 commit comments