Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve port upgrading experience #1027

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ See [the vcpkg docs](https://github.com/microsoft/vcpkg/blob/master/docs/example

Installing additional dependencies will not update any existing dependencies by default. We do not update/upgrade by default because this could cause unexpected rebuilds that could potentially take hours (in the case of LLVM). To update dependencies, pass the `--upgrade-ports` option to the build script along with the respective options affecting vcpkg triplet selection (like `--release`).

You must specify the exact package/ports you want to upgrade. If the port does not exist, this will fail.

## Useful manual vcpkg commands

Sometimes it is useful to run vcpkg commands manually for testing a single package. Ideally, someone who wants to do this would read the [vcpkg documentation](https://github.com/microsoft/vcpkg/tree/master/docs), but below we list some commonly used commands. Inspecting the output of the build script will also show all of the vcpkg commands executed.
Expand Down
17 changes: 13 additions & 4 deletions build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ while [[ $# -gt 0 ]] ; do
esac
shift
done
msg "Passing extra args to 'vcpkg install':"
msg "Passing extra args to vcpkg:"
msg " " "${VCPKG_ARGS[@]}"

function die_if_not_installed {
Expand Down Expand Up @@ -237,10 +237,19 @@ if [[ ${UPGRADE_PORTS} == "true" ]]; then
cd "${repo_dir}"
(
set -x
# shellcheck disable=SC2046
"${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" "${overlays[@]}" --no-dry-run --allow-unsupported
"${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" "${overlays[@]}" --allow-unsupported "${VCPKG_ARGS[@]}" || true

set +x
read -p "Are you sure? If so, enter 'y' " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]
then
set -x
"${vcpkg_dir}/vcpkg" upgrade "${extra_vcpkg_args[@]}" "${overlays[@]}" --no-dry-run --allow-unsupported "${VCPKG_ARGS[@]}" || exit 1
fi
)
) || exit 1
)
exit 0
fi

deps=()
Expand Down