Skip to content

Commit

Permalink
package name is based on runtime name
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanmacfarlane committed May 4, 2016
1 parent f72772d commit ad019f7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Misc/externals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function acquireNode ()
echo "Already extracted"
else
echo "Extracting"
tar zxvf ${node_zip} &> "node_tar.log"
tar zxf ${node_zip} > "node_tar.log"
checkRC "Unzip (node)"
fi

Expand Down Expand Up @@ -151,7 +151,7 @@ function acquireExternalTools ()
checkRC "Download (curl)"

echo "Extracting to layout"
unzip ${tool}.zip -d ${target_dir}
unzip ${tool}.zip -d ${target_dir} > /dev/null

popd > /dev/null
done
Expand Down
33 changes: 28 additions & 5 deletions src/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function heading()
{
echo
echo
echo -------------------------------
echo -----------------------------------------
echo ${1}
echo -------------------------------
echo -----------------------------------------
}

function rundotnet ()
Expand Down Expand Up @@ -225,16 +225,39 @@ function buildtest ()

function package ()
{
# get the runtime we are build for
# if exist Agent.Listener/bin/${BUILD_CONFIG}/dnxcore50
build_folder="Agent.Listener/bin/${BUILD_CONFIG}/dnxcore50"
if [ ! -d "${build_folder}" ]; then
echo "You must build first. Expecting to find ${build_folder}"
fi

pushd "${build_folder}" > /dev/null
pwd
runtime_folder=`ls -d */`

pkg_runtime=${runtime_folder%/}
popd > /dev/null

pkg_dir=`pwd`/../_package

agent_ver=`${LAYOUT_DIR}/bin/Agent.Listener --version` || "failed version"
agent_pkg_name="vsts-agent-${PLATFORM}-${agent_ver}-$(date +%m)$(date +%d)"
agent_pkg_name="vsts-agent-${pkg_runtime}-${agent_ver}"
# -$(date +%m)$(date +%d)"

heading "Packaging ${agent_pkg_name}"

rm -Rf ${LAYOUT_DIR}/_diag
mkdir -p $pkg_dir
pushd $pkg_dir > /dev/null
rm -Rf *
tar -czf "${agent_pkg_name}.tar.gz" -C ${LAYOUT_DIR} .
zip -r "${agent_pkg_name}.zip" ${LAYOUT_DIR}

tar_name="${agent_pkg_name}.tar.gz"
echo "Creating $tar_name in ${LAYOUT_DIR}"
tar -czf "${tar_name}" -C ${LAYOUT_DIR} .

# TODO: create package on windows with powershell.
# zip -r "${agent_pkg_name}.zip" ${LAYOUT_DIR}
popd > /dev/null
}

Expand Down

0 comments on commit ad019f7

Please sign in to comment.