Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/minor-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ Automated steps include:
commit. This makes it easier to cherry-pick to master after the release.
- [ ] Merge release preparation branch into the release branch.
- `git switch "${RELEASE_BRANCH}" && git merge --ff-only "${PREP_BRANCH}"`

- [ ] Tag new release
- [ ] Create new ephemeral GitHub PAT and update the `HOMEBREW_PAT` [secret](https://github.com/vectordotdev/vector/settings/secrets/actions/HOMEBREW_PAT).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 This step introduces an extra manual step. Obviously it would be best if fully automated but it seems challenging because it involves pushing to another repo. At this point, would it be better if we just removed this from publish.yml and added a note for the maintainer to run it manually? The homebrew.rs works as is when ran locally outside the CI.

- [ ] `git tag v"${NEW_VECTOR_VERSION}" -a -m v"${NEW_VECTOR_VERSION}"`
- [ ] `git push origin v"${NEW_VECTOR_VERSION}"`
- [ ] Wait for release workflow to complete.
Expand Down
4 changes: 4 additions & 0 deletions vdev/src/commands/release/homebrew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ fn clone_and_setup_git(username: &str) -> Result<()> {

git::clone(&homebrew_repo)?;
env::set_current_dir("homebrew-brew")?;

// Set the remote URL with credentials to ensure push works
git::set_remote_url("origin", &homebrew_repo)?;

git::set_config_value("user.name", "vic")?;
git::set_config_value("user.email", "[email protected]")?;
Ok(())
Expand Down
6 changes: 6 additions & 0 deletions vdev/src/utils/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ pub fn set_config_value(key: &str, value: &str) -> Result<String> {
.check_output()
}

pub fn set_remote_url(remote_name: &str, url: &str) -> Result<String> {
Command::new("git")
.args(["remote", "set-url", remote_name, url])
.check_output()
}

/// Checks if the current directory's repo is clean
pub fn check_git_repository_clean() -> Result<bool> {
Ok(Command::new("git")
Expand Down
Loading