mirror of
https://github.com/mas-cli/mas
synced 2024-11-25 13:00:23 +00:00
Simplify script/bootstrap
.
We shouldn't need to delete `Brewfile.lock.json` because it doesn't actually lock anything; it just records versions that were installed. If we don't delete it, new `brew bundle install` run just adds info about what was installed during its run to the existing info about previous bundle installs. By not deleting, the code can be simplified as per this commit. Partial #638 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
67ca8f5404
commit
b4e42b5dd6
1 changed files with 3 additions and 12 deletions
|
@ -19,13 +19,11 @@ function usage {
|
|||
exit 1
|
||||
}
|
||||
|
||||
frozen=''
|
||||
|
||||
# Detect presence of `-f` frozen option
|
||||
while getopts "f" opt; do
|
||||
case "${opt}" in
|
||||
f)
|
||||
frozen='-f'
|
||||
frozen='--no-lock --no-upgrade'
|
||||
;;
|
||||
*)
|
||||
usage 1>&2
|
||||
|
@ -35,15 +33,8 @@ done
|
|||
|
||||
printf $'==> 👢 Bootstrapping (%s)\n' "$(script/version)"
|
||||
|
||||
# Install Homebrew tools
|
||||
if [[ "${frozen}" == "-f" ]]; then
|
||||
# --no-lock Don't touch Brewfile.lock.json
|
||||
brew bundle install --no-lock --no-upgrade --verbose
|
||||
else
|
||||
# Allow upgrades
|
||||
rm -f Brewfile.lock.json
|
||||
brew bundle install --verbose
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
brew bundle install ${frozen} --verbose
|
||||
|
||||
mise settings set experimental true
|
||||
mise install --verbose
|
||||
|
|
Loading…
Reference in a new issue