Metadata-Version: 2.1
Name: birdseye-remotes
Version: 0.2.0
Summary: CLI tool for comparing the heads of local and remote git repositories
Home-page: https://github.com/cursive-works/birdseye
Author: Patrick Smith
Author-email: pat.smith@cursive.works
License: MIT
Keywords: git remote information summary
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: GitPython

# Birdseye
A tool for comparing git hashes across local and multiple remotes.
It's purpose is to add confidence and speed when deploying via git to Heroku;
esp. when you have production and stage services to manage.

It requires that you set up your multiple app/environments as outlined by
Heroku here: https://devcenter.heroku.com/articles/multiple-environments

## Query flow
```mermaid
  sequenceDiagram
      birdseye->>github: query branches
      github->>birdseye: all active branches
      birdseye->>local: for each branch compare head
      birdseye->>heroku: for each branch compare head
```
N.B. if you have local branches that are not on Github - they will not be included.

## Installation
Birdseye is a CLI tool and so it's a good idea to install it via [pipx https://pypa.github.io/pipx/

```sh
pipx install birdseye-remotes --pip-args="--extra-index-url=https://pypi.cursive.works"
```

### Repo Configuration
```sh
# see what you've got:
git remote -v
# rename existing `heroku` remote accordingly:
git remote rename heroku (stage | production)
# add remaining remote(s) as needed:
heroku git:remote -a APP --remote (stage | production)
```

```sh
# Set a default environment
git config heroku.remote stage
```


## Developing
```sh
git clone git@github.com:cursive-works/birdseye
cd birdseye
python3 -m venv venv
```

On subsequent sessions
```sh
 . ./venv/bin/activate
 pip install -r requirements.txt
```

### Deploying to our private pypi with `dumb_pypi`

This part is only necessary if you are releasing the package.
`pip install dumb_pypi` (to your system python) if you don't have it

```
python setup.py bdist_wheel

cd dist

aws s3 cp birdseye_remotes-[VERSION]-py3-none-any.whl s3://cursive-python-packages/pkgs/

aws s3 ls s3://cursive-python-packages/pkgs/ | awk '{print $4}' > my-packages
dumb-pypi --package-list my-packages --packages-url https://pypi.cursive.works/pkgs --output-dir index
aws s3 cp index/simple/ s3://cursive-python-packages/ --recursive
```


