Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change all references from pygmy-go to pygmy. #365

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 25 additions & 25 deletions .github/workflows/pygmy.yml
Expand Up @@ -48,7 +48,7 @@ jobs:
# - name: Switch Docker daemon mode to Linux
# run: Start-Process $Env:ProgramFiles\Docker\Docker\DockerCli.exe -ArgumentList "-SwitchLinuxEngine"
# - name: Build
# run: docker build -t pygmy-go .
# run: docker build -t pygmy.
# - name: Run status command
# run: builds/${PYGMY_PATH} --config examples/pygmy.basic.yml status;
# - name: Run version command
Expand Down Expand Up @@ -82,29 +82,29 @@ jobs:
sudo dpkg -i --ignore-depends=docker-ce lando-stable.deb;

- name: Compile
run: go build -o pygmy-go-linux-amd64
run: go build -o pygmy-linux-amd64

- name: Basic test
run: |
./pygmy-go-linux-amd64 pull;
./pygmy-go-linux-amd64 pull;
./pygmy-go-linux-amd64 status;
./pygmy-go-linux-amd64 --config examples/pygmy.basic.yml up;
./pygmy-go-linux-amd64 --config examples/pygmy.basic.yml status;
./pygmy-go-linux-amd64 --config examples/pygmy.basic.yml version;
./pygmy-linux-amd64 pull;
./pygmy-linux-amd64 pull;
./pygmy-linux-amd64 status;
./pygmy-linux-amd64 --config examples/pygmy.basic.yml up;
./pygmy-linux-amd64 --config examples/pygmy.basic.yml status;
./pygmy-linux-amd64 --config examples/pygmy.basic.yml version;

- name: Show pygmy image versions
run: |
docker ps -a --filter "label=pygmy.name"

- name: SSH Key test
run: |
./pygmy-go-linux-amd64 addkey /home/runner/.ssh/id_rsa.pub;
./pygmy-go-linux-amd64 addkey /home/runner/.ssh/id_pwd.pub;
./pygmy-go-linux-amd64 status;
./pygmy-go-linux-amd64 status | grep 'id_rsa';
./pygmy-linux-amd64 addkey /home/runner/.ssh/id_rsa.pub;
./pygmy-linux-amd64 addkey /home/runner/.ssh/id_pwd.pub;
./pygmy-linux-amd64 status;
./pygmy-linux-amd64 status | grep 'id_rsa';
docker run --rm -i --volumes-from amazeeio-ssh-agent uselagoon/php-7.4-cli /usr/bin/ssh-add -l | grep 'id_rsa';
# ./pygmy-go-linux-amd64 status | grep 'id_pwd';
# ./pygmy-linux-amd64 status | grep 'id_pwd';

- name: Resolv file test
run: |
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
sleep 5;
curl --HEAD http://drupal9-example-advanced.docker.amazee.io;
curl --HEAD http://drupal9-example-advanced.docker.amazee.io | grep "X-LAGOON";
../../pygmy-go-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://drupal9-example-advanced.docker.amazee.io';
../../pygmy-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://drupal9-example-advanced.docker.amazee.io';
docker-compose -p drupal9-advanced down;
docker-compose -p drupal9-advanced rm;
cd ../../;
Expand All @@ -164,7 +164,7 @@ jobs:
sleep 5;
curl --HEAD http://drupal9-base.docker.amazee.io;
curl --HEAD http://drupal9-base.docker.amazee.io | grep "X-LAGOON";
../../pygmy-go-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://drupal9-base.docker.amazee.io';
../../pygmy-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://drupal9-base.docker.amazee.io';
docker-compose -p drupal-base down;
docker-compose -p drupal-base rm;
cd ../../;
Expand All @@ -177,7 +177,7 @@ jobs:
sleep 5;
curl --HEAD http://drupal9-postgres.docker.amazee.io;
curl --HEAD http://drupal9-postgres.docker.amazee.io | grep "X-LAGOON";
../../pygmy-go-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://drupal9-postgres.docker.amazee.io';
../../pygmy-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://drupal9-postgres.docker.amazee.io';
docker-compose -p drupal-postgres down;
docker-compose -p drupal-postgres rm;
cd ../../;
Expand All @@ -189,7 +189,7 @@ jobs:
docker-compose -p node up -d;
curl --HEAD http://node.docker.amazee.io;
curl --HEAD http://node.docker.amazee.io | grep "X-LAGOON";
../../pygmy-go-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://node.docker.amazee.io';
../../pygmy-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://node.docker.amazee.io';
docker-compose -p node down;
docker-compose -p node rm;
cd ../../;
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
sleep 5;
curl --HEAD http://wordpress-example-simple.docker.amazee.io;
curl --HEAD http://wordpress-example-simple.docker.amazee.io | grep "X-LAGOON";
../../pygmy-go-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://wordpress-example-simple.docker.amazee.io';
../../pygmy-linux-amd64 --config ../../examples/pygmy.basic.yml status | grep '\- http://wordpress-example-simple.docker.amazee.io';
docker-compose -p wordpress-simple down;
docker-compose -p wordpress-simple rm;
cd ../../;
Expand All @@ -244,17 +244,17 @@ jobs:

- name: Test the down command
run: |
./pygmy-go-linux-amd64 --config examples/pygmy.basic.yml down | grep 'Successfully stopped amazeeio';
./pygmy-go-linux-amd64 --config examples/pygmy.basic.yml status | grep '\[ \] amazeeio-' | grep 'is not running';
./pygmy-go-linux-amd64 --config examples/pygmy.basic.yml status | grep 'Running as container amazeeio-' && false || true;
./pygmy-go-linux-amd64 --config examples/pygmy.basic.yml up;
./pygmy-go-linux-amd64 --config examples/pygmy.basic.yml status | grep 'Running as container amazeeio-' && true || false;
./pygmy-linux-amd64 --config examples/pygmy.basic.yml down | grep 'Successfully stopped amazeeio';
./pygmy-linux-amd64 --config examples/pygmy.basic.yml status | grep '\[ \] amazeeio-' | grep 'is not running';
./pygmy-linux-amd64 --config examples/pygmy.basic.yml status | grep 'Running as container amazeeio-' && false || true;
./pygmy-linux-amd64 --config examples/pygmy.basic.yml up;
./pygmy-linux-amd64 --config examples/pygmy.basic.yml status | grep 'Running as container amazeeio-' && true || false;

- name: Cowsay test
run: ./pygmy-go-linux-amd64 --config examples/pygmy.basic.yml up | grep 'holy ship' || true;
run: ./pygmy-linux-amd64 --config examples/pygmy.basic.yml up | grep 'holy ship' || true;

- name: Cleanup pygmy
run: ./pygmy-go-linux-amd64 clean;
run: ./pygmy-linux-amd64 clean;

- name: Cleanup after tests.
run: |
Expand Down
18 changes: 9 additions & 9 deletions .goreleaser.yml
Expand Up @@ -3,16 +3,16 @@ env:
- GOPROXY=https://gocenter.io

archives:
- id: pygmy-go
- id: pygmy
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds:
- pygmy-go
- id: pygmy-go-static
- pygmy
- id: pygmy-static
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}_static"
builds:
- pygmy-go-static
- pygmy-static
builds:
- id: pygmy-go
- id: pygmy
env:
- CGO_ENABLED=0
goos:
Expand All @@ -24,7 +24,7 @@ builds:
- amd64
- arm
- arm64
- id: pygmy-go-static
- id: pygmy-static
env:
- CGO_ENABLED=0
flags:
Expand All @@ -41,13 +41,13 @@ builds:

brews:
- ids:
- pygmy-go
- pygmy
tap:
owner: pygmystack
name: homebrew-pygmy
folder: Formula
homepage: "https://github.com/pygmystack/pygmy"
description: "amazee.io's local development helper tool"
skip_upload: false
test: system "#{bin}/pygmy-go version"
install: bin.install "pygmy-go"
test: system "#{bin}/pygmy version"
install: bin.install "pygmy"
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

44 changes: 22 additions & 22 deletions Dockerfile
Expand Up @@ -8,28 +8,28 @@ COPY service/ /go/src/github.com/pygmystack/pygmy/service/

WORKDIR /go/src/github.com/pygmystack/pygmy/
RUN GO111MODULE=on go mod verify
RUN GO111MODULE=on GOOS=linux GOARCH=386 go build -o pygmy-go-linux-386 .
RUN GO111MODULE=on GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o pygmy-go-linux-386-static .
RUN GO111MODULE=on GOOS=linux GOARCH=arm go build -o pygmy-go-linux-arm .
RUN GO111MODULE=on GOOS=linux GOARCH=arm CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o pygmy-go-linux-arm-static .
RUN GO111MODULE=on GOOS=linux GOARCH=arm64 go build -o pygmy-go-linux-arm64 .
RUN GO111MODULE=on GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o pygmy-go-linux-arm64-static .
RUN GO111MODULE=on GOOS=linux GOARCH=amd64 go build -o pygmy-go-linux-amd64 .
RUN GO111MODULE=on GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o pygmy-go-linux-amd64-static .
RUN GO111MODULE=on GOOS=darwin GOARCH=amd64 go build -o pygmy-go-darwin-amd64 .
RUN GO111MODULE=on GOOS=darwin GOARCH=arm64 go build -o pygmy-go-darwin-arm64 .
RUN GO111MODULE=on GOOS=windows GOARCH=amd64 go build -o pygmy-go.exe .
RUN GO111MODULE=on GOOS=linux GOARCH=386 go build -o pygmy-linux-386 .
RUN GO111MODULE=on GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o pygmy-linux-386-static .
RUN GO111MODULE=on GOOS=linux GOARCH=arm go build -o pygmy-linux-arm .
RUN GO111MODULE=on GOOS=linux GOARCH=arm CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o pygmy-linux-arm-static .
RUN GO111MODULE=on GOOS=linux GOARCH=arm64 go build -o pygmy-linux-arm64 .
RUN GO111MODULE=on GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o pygmy-linux-arm64-static .
RUN GO111MODULE=on GOOS=linux GOARCH=amd64 go build -o pygmy-linux-amd64 .
RUN GO111MODULE=on GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o pygmy-linux-amd64-static .
RUN GO111MODULE=on GOOS=darwin GOARCH=amd64 go build -o pygmy-darwin-amd64 .
RUN GO111MODULE=on GOOS=darwin GOARCH=arm64 go build -o pygmy-darwin-arm64 .
RUN GO111MODULE=on GOOS=windows GOARCH=amd64 go build -o pygmy.exe .

FROM alpine
WORKDIR /app
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-linux-386 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-linux-386-static .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-linux-arm .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-linux-arm-static .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-linux-arm64 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-linux-arm64-static .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-linux-amd64 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-linux-amd64-static .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-darwin-amd64 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go-darwin-arm64 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-go.exe .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-linux-386 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-linux-386-static .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-linux-arm .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-linux-arm-static .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-linux-arm64 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-linux-arm64-static .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-linux-amd64 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-linux-amd64-static .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-darwin-amd64 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy-darwin-arm64 .
COPY --from=builder /go/src/github.com/pygmystack/pygmy/pygmy.exe .
10 changes: 5 additions & 5 deletions Makefile
Expand Up @@ -3,16 +3,16 @@ SHELL := /bin/bash
DIR := ${CURDIR}

build:
docker build -t pygmy-go .
docker build -t pygmy .
@echo "Removing binaries from previous build"
docker run --rm -v $(DIR):/data pygmy-go sh -c 'rm -f /data/builds/pygmy-go*'
docker run --rm -v $(DIR):/data pygmy sh -c 'rm -f /data/builds/pygmy*'
@echo "Done"
@echo "Copying binaries to build directory"
docker run --rm -v $(DIR):/data pygmy-go sh -c 'cp pygmy-g* /data/builds/.'
docker run --rm -v $(DIR):/data pygmy sh -c 'cp pygmy* /data/builds/.'
@echo "Done"
@echo "Enjoy using pygmy-go binaries in the $(DIR)/build directory."
@echo "Enjoy using pygmy binaries in the $(DIR)/build directory."

clean:
docker image rm -f pygmy-go
docker image rm -f pygmy
docker image prune -f --filter="label=stage=builder"

29 changes: 16 additions & 13 deletions README.md
Expand Up @@ -21,7 +21,7 @@ past on Windows.

## Is Pygmy running?

These instructions will currently install the new version as `pygmy-go` so that the
These instructions will currently install the new version as `pygmy` so that the
old version is still available if you have installed it. With no Pygmy running,
you should get "connection refused" when attempting to connect to the local amazee network.

Expand All @@ -43,13 +43,13 @@ configuration to switch out the `haproxy` image for a compatible one if you'd li
**Works for**: Linux, MacOS & Windows

```shell
git clone https://github.com/pygmystack/pygmy.git && cd pygmy-go;
git clone https://github.com/pygmystack/pygmy.git && cd pygmy;
make build;
cp ./builds/pygmy-go-darwin /usr/local/bin/pygmy-go;
chmod +x /usr/local/bin/pygmy-go;
cp ./builds/pygmy-darwin /usr/local/bin/pygmy;
chmod +x /usr/local/bin/pygmy;
```

Pygmy is now an executable as `pygmy-go`, while any existing Pygmy is still executable
Pygmy is now an executable as `pygmy`, while any existing Pygmy is still executable
as `pygmy`. Now start Pygmy and use the new `status` command.

### Using Homebrew
Expand All @@ -65,16 +65,19 @@ brew install pygmy;

**Works for**: [Arch-based Linux Distributions](https://wiki.archlinux.org/title/Arch-based_distributions) (Manjaro, Elementary, ArcoLinux etc)

[pygmy-go](https://aur.archlinux.org/packages/pygmy-go/) and [pygmy-go-git](https://aur.archlinux.org/packages/pygmy-go-git/)
are available via the Arch User Repository for Arch-based Linux distributions on the community stream. Unfortunately,
Pygmy is not yet available via other distribution methods, so it is otherwise recommended to use homebrew or compile
from source.
[pygmy](https://aur.archlinux.org/packages/pygmy/), [pygmy-bin](https://aur.archlinux.org/packages/pygmy-bin/) and
[pygmy-git](https://aur.archlinux.org/packages/pygmy-git/) are available via the Arch User Repository for Arch-based
Linux distributions on the community stream. Unfortunately, Pygmy is not yet available via other distribution methods,
so it is otherwise recommended to use homebrew to install it, download a pre-compiled binary from the releases page, or
to compile from source.

```shell
# Install the latest release:
yay -S pygmy-go;
# Freshly compile the latest release:
yay -S pygmy;
# Download the latest release precompiled:
yay -S pygmy-bin;
# Download and compile the latest HEAD from GitHub on the main branch:
yay -S pygmy-go-git;
yay -S pygmy-git;
```

## Usage
Expand Down Expand Up @@ -121,7 +124,7 @@ It will use `dind` and your local daemon to walk through several tests which sho

1. First clone the project:
```
git clone https://github.com/pygmystack/pygmy.git pygmy-go && cd pygmy-go
git clone https://github.com/pygmystack/pygmy.git pygmy && cd pygmy
```
2. Perform any updates as required.
3. Clean the environment.
Expand Down
16 changes: 8 additions & 8 deletions cmd/completion.go
Expand Up @@ -34,13 +34,13 @@ var completionCmd = &cobra.Command{

Bash:

$ source <(pygmy-go completion bash)
$ source <(pygmy completion bash)

# To load completions for each session, execute once:
# Linux:
$ pygmy-go completion bash > /etc/bash_completion.d/pygmy-go
$ pygmy completion bash > /etc/bash_completion.d/pygmy
# macOS:
$ pygmy-go completion bash > /usr/local/etc/bash_completion.d/pygmy-go
$ pygmy completion bash > /usr/local/etc/bash_completion.d/pygmy

Zsh:

Expand All @@ -50,23 +50,23 @@ Zsh:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc

# To load completions for each session, execute once:
$ pygmy-go completion zsh > "${fpath[1]}/pygmy-go"
$ pygmy completion zsh > "${fpath[1]}/pygmy"

# You will need to start a new shell for this setup to take effect.

fish:

$ pygmy-go completion fish | source
$ pygmy completion fish | source

# To load completions for each session, execute once:
$ pygmy-go completion fish > ~/.config/fish/completions/pygmy-go.fish
$ pygmy completion fish > ~/.config/fish/completions/pygmy.fish

PowerShell:

PS> pygmy-go completion powershell | Out-String | Invoke-Expression
PS> pygmy completion powershell | Out-String | Invoke-Expression

# To load completions for every new session, run:
PS> pygmy-go completion powershell > pygmy-go.ps1
PS> pygmy completion powershell > pygmy.ps1
# and source this file from your PowerShell profile.
`,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Expand Up @@ -41,7 +41,7 @@ var (

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "pygmy-go",
Use: "pygmy",
ValidArgs: validArgs,
Short: "Amazeeio's local development tool",
Long: `Amazeeio's local development tool,
Expand Down