forked from riok/mapperly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.sh
executable file
·28 lines (21 loc) · 916 Bytes
/
package.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
set -Eeuo pipefail
# pack a nupkg for each roslyn version that is supported by Mapperly
# and merge them together into one nupkg
roslyn_versions=('4.0' '4.4' '4.5')
RELEASE_VERSION=${RELEASE_VERSION:-'0.0.1-dev'}
RELEASE_NOTES=${RELEASE_NOTES:-''}
# https://stackoverflow.com/a/246128/3302887
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
artifacts_dir="${script_dir}/../artifacts"
for roslyn_version in "${roslyn_versions[@]}"; do
dotnet pack \
"${script_dir}/../src/Riok.Mapperly" \
-c Release \
/p:ROSLYN_VERSION="${roslyn_version}" \
-o "${artifacts_dir}/roslyn-${roslyn_version}" \
/p:Version="${RELEASE_VERSION}" \
/p:PackageReleaseNotes=\""${RELEASE_NOTES}"\"
done
echo merging multi targets to one nupkg
zipmerge "${artifacts_dir}/Riok.Mapperly.${RELEASE_VERSION}.nupkg" "${artifacts_dir}"/*/*.nupkg