mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-27 04:35:25 +00:00
9042bbae9a
* chore(deps-dev): bump prettier-plugin-sh from 0.6.1 to 0.7.1 Bumps [prettier-plugin-sh](https://github.com/rx-ts/prettier) from 0.6.1 to 0.7.1. - [Release notes](https://github.com/rx-ts/prettier/releases) - [Changelog](https://github.com/rx-ts/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/rx-ts/prettier/compare/prettier-plugin-sh@0.6.1...prettier-plugin-sh@0.7.1) --- updated-dependencies: - dependency-name: prettier-plugin-sh dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: reformat shell scripts Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Akash Satheesan <akash.satheesan@protonmail.com>
48 lines
1.5 KiB
Bash
Executable File
48 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
main() {
|
|
cd "$(dirname "$0")/../.."
|
|
# Only sourcing this so we get access to $VERSION
|
|
source ./ci/lib.sh
|
|
|
|
# NOTE: we need to make sure cdrci/homebrew-core
|
|
# is up-to-date
|
|
# otherwise, brew bump-formula-pr will use an
|
|
# outdated base
|
|
echo "Cloning cdrci/homebrew-core"
|
|
git clone https://github.com/cdrci/homebrew-core.git
|
|
|
|
echo "Changing into homebrew-core directory"
|
|
cd homebrew-core && pwd
|
|
|
|
echo "Adding Homebrew/homebrew-core as $(upstream)"
|
|
git remote add upstream https://github.com/Homebrew/homebrew-core.git
|
|
|
|
echo "Fetching upstream commits..."
|
|
git fetch upstream
|
|
|
|
echo "Merging in latest changes"
|
|
git merge upstream/master
|
|
|
|
echo "Pushing changes to cdrci/homebrew-core fork on GitHub"
|
|
# Source: https://serverfault.com/a/912788
|
|
# shellcheck disable=SC2016,SC2028
|
|
echo '#!/bin/sh\nexec echo "$HOMEBREW_GITHUB_API_TOKEN"' > "$HOME"/.git-askpass.sh
|
|
# Ensure it's executable since we just created it
|
|
chmod +x "$HOME/.git-askpass.sh"
|
|
# GIT_ASKPASS lets us use the password when pushing without revealing it in the process list
|
|
# See: https://serverfault.com/a/912788
|
|
GIT_ASKPASS="$HOME/.git-askpass.sh" git push https://cdr-oss@github.com/cdr-oss/homebrew-core.git --all
|
|
|
|
# Find the docs for bump-formula-pr here
|
|
# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18
|
|
brew bump-formula-pr --force --version="${VERSION}" code-server --no-browse --no-audit
|
|
|
|
# Clean up and remove homebrew-core
|
|
cd ..
|
|
rm -rf homebrew-core
|
|
}
|
|
|
|
main "$@"
|