Skip to content

feat: Use new repo urls and add binary to shell path#46

Merged
duffney merged 13 commits intomainfrom
feature/installer-updates
Aug 4, 2025
Merged

feat: Use new repo urls and add binary to shell path#46
duffney merged 13 commits intomainfrom
feature/installer-updates

Conversation

@duffney
Copy link
Copy Markdown
Collaborator

@duffney duffney commented Jul 30, 2025

This pull request updates the release workflow in .github/workflows/release.yml and 'install.sh' to improve artifact naming consistency, include version information in artifact names, and enhance the release process. Key changes include adding architecture and version details to artifact names, extracting the version dynamically, and updating download links in the release notes.

Shell Path reloading

  • Added support for reloading shell profiles to add the wassette binary to the 'PATH' variable of the shell environment

Download URL

  • Updated the 'install.sh' to download the latest version of wassette from the most recent release artifacts using the versioned artifact naming scheme.

Artifact naming improvements:

  • Updated artifact names to include architecture (arch) and version information, ensuring consistency across all platforms (e.g., wassette_${{ steps.version.outputs.version }}_${{ matrix.arch }}).

Version extraction:

  • Added a new step to extract the version from the GitHub reference (github.ref_name) and store it in the GITHUB_OUTPUT, enabling dynamic versioning in artifact names.

Release notes updates:

  • Updated download links in the release notes to reflect the new artifact naming convention, including version and architecture details.

@Mossaka
Copy link
Copy Markdown
Collaborator

Mossaka commented Jul 30, 2025

It would be helpful to include a bit more context on the changes—just reading the title, I didn’t expect this PR to include quite so much

@Mossaka Mossaka requested a review from Copilot July 30, 2025 18:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the wassette installer script to use new repository URLs and artifact names, while adding functionality to automatically add the binary to the shell's PATH environment variable.

  • Updates installer to use new GitHub repository API endpoints and artifact naming convention
  • Replaces manual PATH configuration instructions with automatic shell configuration file modification
  • Streamlines installation process by automatically configuring PATH in bash/zsh profile files

@duffney
Copy link
Copy Markdown
Collaborator Author

duffney commented Jul 30, 2025

It would be helpful to include a bit more context on the changes—just reading the title, I didn’t expect this PR to include quite so much

Copilot was refusing to generate comments for me

It would be helpful to include a bit more context on the changes—just reading the title, I didn’t expect this PR to include quite so much

My apologies, I meant to open this as a draft.

install.sh Outdated
Comment on lines +278 to +284
# Create a system-wide PATH file for immediate recognition
print_status "Creating PATH configuration in /etc/environment (if writable)"
if sudo -n true 2>/dev/null; then
# We have sudo access
if [[ -f /etc/environment ]]; then
if ! sudo grep -q "$HOME/.local/bin" /etc/environment 2>/dev/null; then
echo "PATH=\"$HOME/.local/bin:\$PATH\"" | sudo tee -a /etc/environment > /dev/null
print_status "Added PATH to /etc/environment"
fi

echo ""
log_info "Next steps:"
log_info "1. Run '$BINARY_NAME --help' to see available commands"
log_info "2. Create a policy.yaml file for your tools"
log_info "3. Start the server with: $BINARY_NAME serve --http --policy-file policy.yaml"
log_info ""
log_info "For more information, visit: https://github.com/$REPO"
else
log_error "Installation verification failed"
exit 1
fi
}

main "$@"
else
# Skip system-wide PATH configuration
print_warning "Skipping system-wide PATH configuration in /etc/environment"
print_warning "Consider manually adding '$HOME/.local/bin' to your PATH if needed"
fi
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this is undesirable for most users because they don't want a script to mess with their system-wide environment PATH. The user should be responsible for any system-wide PATH modifications if they are truly needed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I can't disagree with that :) Just fixed it and removed the system-wide changes from the 'installer.sh'

# - macOS (Intel, Apple Silicon)
#
# The binary will be installed to: ~/.local/bin/wassette
# PATH will be updated in: ~/.bashrc, ~/.zshrc, ~/.profile
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why adding to all three? Could we only add the path to ~/.profile

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Using only the '.profile' forces the user to 'source ~/.profile' to make the wassette binary available to them in the PATH variable. By using the shell's configuration file it becomes immediately available in a new session that doesn't require a new login event.

I just pushed a change that only updates the .profile when a shell configuration file cannot be found. So, it works like this:

  • If you're using bash: It will try to add to ~/.bashrc or ~/.bash_profile
  • If you're using zsh: It will try to add to ~/.zshrc
  • If you're using another shell: It will only try to add to ~/.profile and prompt you to re-source the profile

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think at the end of the script that prints "you need to run source ~/.profile" is a good compromise

# The binary will be installed to: ~/.local/bin/wassette
# PATH will be updated in: ~/.bashrc, ~/.zshrc, ~/.profile
#
#####################################################################
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This could be a follow up but ideally this script should check if wassette is already installed and if its version matches the latest release before downloading

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good call out, this will need to be added when we create installer packages for brew and winget.

duffney and others added 13 commits August 3, 2025 19:29
…shell path

Signed-off-by: Josh Duffney <jduffney@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…k from copilot suggestion

Signed-off-by: Josh Duffney <jduffney@microsoft.com>
Signed-off-by: Josh Duffney <jduffney@microsoft.com>
…nges are necessary

Signed-off-by: Josh Duffney <jduffney@microsoft.com>
Signed-off-by: Josh Duffney <jduffney@microsoft.com>
@duffney duffney force-pushed the feature/installer-updates branch from 4ef48ab to f920554 Compare August 4, 2025 00:29
@duffney duffney merged commit 6cdb85a into main Aug 4, 2025
5 checks passed
@duffney duffney deleted the feature/installer-updates branch August 4, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants