Skip to content

Commit

Permalink
Merge pull request #851 from dahlia/master
Browse files Browse the repository at this point in the history
Fix two bugs from GitHub Actions scripts
  • Loading branch information
dahlia authored Apr 25, 2020
2 parents 4d44c1b + ca7c1ce commit c0b8c17
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/bin/dist-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,6 @@ version="$(cat obj/package_version.txt)"
version_prefix="$(cat obj/version_prefix.txt)"
package_version="$(cat obj/package_version.txt)"

for project in "${projects[@]}"; do
rm -rf "./$project/bin/$configuration/"

dotnet_args="-p:Version=$version"
if [ -f obj/version_suffix.txt ]; then
dotnet_args="$dotnet_args -p:NoPackageAnalysis=true"
fi
# shellcheck disable=SC2086
dotnet build -c "$configuration" $dotnet_args
# shellcheck disable=SC2086
dotnet pack "$project" -c "$configuration" $dotnet_args

ls -al "./$project/bin/$configuration/"
if [ "$package_version" != "$version_prefix" ]; then
rm -f "./$project/bin/$configuration/$project.$version_prefix.nupkg"
fi
done

for project in "${executables[@]}"; do
for rid in "${rids[@]}"; do
output_dir="./$project/bin/$configuration/$rid/"
Expand All @@ -54,3 +36,21 @@ for project in "${executables[@]}"; do
rm -rf "$output_dir"
done
done

for project in "${projects[@]}"; do
rm -rf "./$project/bin/$configuration/"

dotnet_args="-p:Version=$version"
if [ -f obj/version_suffix.txt ]; then
dotnet_args="$dotnet_args -p:NoPackageAnalysis=true"
fi
# shellcheck disable=SC2086
dotnet build -c "$configuration" $dotnet_args
# shellcheck disable=SC2086
dotnet pack "$project" -c "$configuration" $dotnet_args

ls -al "./$project/bin/$configuration/"
if [ "$package_version" != "$version_prefix" ]; then
rm -f "./$project/bin/$configuration/$project.$version_prefix.nupkg"
fi
done
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
if: github.event_name == 'pull_request'
with:
ref: ${{ github.pull_request.head.sha }}
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- run: mkdir -p Docs/obj/
- run: Docs/build.ps1
shell: pwsh
Expand Down

0 comments on commit c0b8c17

Please sign in to comment.