forked from dotnet/corefx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish-packages.sh
executable file
·39 lines (31 loc) · 1.36 KB
/
publish-packages.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
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
usage()
{
echo "Publishes the NuGet packages to the specified location."
echo "For publishing to Azure the following properties are required."
echo " /p:CloudDropAccountName='account name'"
echo " /p:CloudDropAccessToken='access token'"
exit 1
}
working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
publish_packages_log=$working_tree_root/publish-packages.log
options="/nologo /flp:v=detailed;Append;LogFile=$publish_packages_log"
allargs="$@"
echo -e "Running publish-packages.sh $allargs" > $publish_packages_log
# Parse arguments
if [ "$allargs" == "-h" ] || [ "$allargs" == "--help" ]; then
usage
fi
# Ensure that MSBuild is available
echo "Running init-tools.sh"
$working_tree_root/init-tools.sh
echo -e "\n$working_tree_root/Tools/corerun $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/publish.proj $options $allargs" >> $publish_packages_log
$working_tree_root/Tools/corerun $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/publish.proj $options $allargs
if [ $? -ne 0 ]; then
echo -e "\nAn error occurred. Aborting publish-packages.sh ." >> $publish_packages_log
echo "ERROR: An error occurred while publishing packages, see $publish_packages_log for more details."
exit 1
fi
echo "Done publishing packages."
echo -e "\nDone publishing packages." >> $publish_packages_log
exit 0