Skip to main content

A more mighty port bump

Project description

🌊 seaport

A more mighty port bump for MacPorts!

Test Status GitHub Workflow Status GitHub Workflow Status Codecov
Version Info PyPI GitHub tag (latest by date) PyPI - Downloads
Code Analysis LGTM Grade Code Climate maintainability CodeFactor Grade Codacy grade

✨ Features

  • Automatically determines new version numbers and checksums for MacPorts portfiles.
  • Copies the changes to your clipboard 📋, and optionally sends a PR to update them.
  • Contains additional checking functionality, such as running tests, linting and installing the updated program.
  • PEP 561 compatible, with built in support for type checking.

🤖 Example

> seaport clip gping
🌊 Starting seaport...
👍 New version is 1.2.0-post
🔻 Downloading from https://github.com/orf/gping/tarball/v1.2.0-post/gping-1.2.0-post.tar.gz
🔎 Checksums:
Old rmd160: 8b274132c8389ec560f213007368c7f521fdf682
New rmd160: 4a614e35d4e1e496871ee2b270ba8836f84650c6
Old sha256: 1879b37f811c09e43d3759ccd97d9c8b432f06c75a27025cfa09404abdeda8f5
New sha256: 1008306e8293e7c59125de02e2baa6a17bc1c10de1daba2247bfc789eaf34ff5
Old size: 853432
New size: 853450
⏪️ Changing revision numbers
No changes necessary
📋 The contents of the portfile have been copied to your clipboard!

⬇️ Install

Note that if installing from PyPi or building from source, MacPorts needs to already be installed, and GitHub CLI is required if using the --pr flag.

Homebrew 🍺

Binary bottles are available for x86_64_linux, catalina and big_sur.

brew install harens/tap/seaport

PyPi 🐍

pip install seaport

💻 Usage

> seaport --help
Usage: seaport [OPTIONS] COMMAND [ARGS]...

  Bumps the version number and checksum of a port.

  For more information, please visit https://github.com/harens/seaport

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  clip  Bumps the version number and checksum of NAME, and copies the
        result...

  pr    Bumps the version number and checksum of NAME, and sends a PR to...

📋 seaport clip NAME

Copies the updated portfile to your clipboard

> seaport clip --help
🌊 Starting seaport...
Usage: seaport clip [OPTIONS] NAME

  Bumps the version number and checksum of NAME, and copies the result to
  your clipboard.

Options:
  --bump TEXT               The new version number
  --test / --no-test        Runs port test
  --lint / --no-lint        Runs port lint --nitpick
  --install / --no-install  Installs the port and allows testing of basic
                            functionality

  --help                    Show this message and exit.

📛 name (Required)

The name of the port to update.

e.g. seaport clip gping

🔻 --bump TEXT

Manually set the version number to bump it to. This should be in the same format as the output of the livecheck.

By default, it uses the value outputted from the livecheck.

This flag can be useful if there's no livecheck available or you want to override it.

e.g. seaport clip gping --bump 1.2.0-post

🧪 --test / --no-test (default --no-test)

Runs sudo port test NAME after updating the portfile.

e.g. seaport clip py-rich --test

🤔 --lint / --no-lint (default --no-lint)

Runs port lint --nitpick NAME after updating the portfile.

e.g. seaport clip gping --lint

🔨 --install / --no-install (default --no-install)

Installs the port via the updated portfile and allows testing of basic functionality. After this has been completed, the port is uninstalled from the user's system.

e.g. seaport clip gping --install

✉️ seaport pr NAME

Sends a pull requrest to macports/macports-ports with the updated portfile contents.

The flags in clip are also valid for this subcommand.

The pull request template is automatically filled in depending on what flags the command was run with (e.g. if --lint was used, this would be noted in the verification section of the template).

> seaport pr --help
🌊 Starting seaport...
Usage: seaport pr [OPTIONS] NAME LOCATION

  Bumps the version number and checksum of NAME, and sends a PR to update
  it.

Options:
  --bump TEXT               The new version number
  --test / --no-test        Runs port test
  --lint / --no-lint        Runs port lint --nitpick
  --install / --no-install  Installs the port and allows testing of basic
                            functionality

  --new                     Send a PR from the local portfile repo
  --help                    Show this message and exit.

--new

This flag is used if sending a PR for a new portfile from the user's local portfile repo.

To bypass the version number checks, it is recommended to set a different version number within the file. This is corrected automatically by seaport.

🚀 Use of sudo

Sudo is only required if --test, --lint or --install are specified, and it will be asked for during runtime. This is since the local portfile repo needs to be modified to be able to run the relevant commands.

Any changes made to the local portfile repo are reverted during the cleanup stage.

🔨 Contributing

Any change, big or small, that you think can help improve this action is more than welcome 🎉.

As well as this, feel free to open an issue with any new suggestions or bug reports. Every contribution is appreciated.

📒 Notice of Non-Affiliation and Disclaimer

MacPorts Logo

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with the MacPorts Project, or any of its subsidiaries or its affiliates. The official MacPorts Project website can be found at https://www.macports.org.

The name MacPorts as well as related names, marks, emblems and images are registered trademarks of their respective owners.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seaport-0.3.0.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

seaport-0.3.0-py3-none-any.whl (17.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page