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

convert popeye to github VersionStrategy #1061

Closed
wants to merge 1 commit into from

Conversation

rgee0
Copy link
Contributor

@rgee0 rgee0 commented May 10, 2024

Description

Converts derailed/popeye to VersionStrategy: "github" as a janitorial test case.
Also adds tests for derailed/popeye covering the architectures provided by the project.

Motivation and Context

  • I have raised an issue to propose this change, which has been given a label of design/approved by a maintainer (required)
    😬

How Has This Been Tested?

make e2e

➜  arkade git:(convertPopeye) βœ— go clean -testcache

➜  arkade git:(convertPopeye) βœ— make e2e
…
PASS
coverage: 59.9% of statements
ok      github.com/alexellis/arkade/pkg/get     35.232s coverage: 59.9% of statements

test-tool.sh

➜  arkade git:(convertPopeye) βœ— make build && ./hack/test-tool.sh popeye
+ ./arkade get popeye --arch arm64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/popeye
/Users/rgee0/.arkade/bin/popeye: Mach-O 64-bit executable arm64
+ rm /Users/rgee0/.arkade/bin/popeye
+ echo

+ ./arkade get popeye --arch x86_64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/popeye
/Users/rgee0/.arkade/bin/popeye: Mach-O 64-bit executable x86_64
+ rm /Users/rgee0/.arkade/bin/popeye
+ echo

+ ./arkade get popeye --arch x86_64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/popeye
/Users/rgee0/.arkade/bin/popeye: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=mcvIB1SKQnwjlitRzVX6/6cB1ltvpIUQoAtUyhriZ/0PZ7H2RJJo4NQWkItLPf/OT1BaF-QFwY2s-oEOw1I, stripped
+ rm /Users/rgee0/.arkade/bin/popeye
+ echo

+ ./arkade get popeye --arch aarch64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/popeye
/Users/rgee0/.arkade/bin/popeye: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=7kL4hk19RKruiVgkbr5O/KSVHZD69pPcskfMIW3Q5/FYRl0PrEDRF1Z-bLZIhA/i9vGZtiS30vs0g66Gyrt, stripped
+ rm /Users/rgee0/.arkade/bin/popeye
+ echo

+ ./arkade get popeye --arch x86_64 --os mingw --quiet
+ file /Users/rgee0/.arkade/bin/popeye.exe
/Users/rgee0/.arkade/bin/popeye.exe: PE32+ executable (console) x86-64, for MS Windows
+ rm /Users/rgee0/.arkade/bin/popeye.exe
+ echo

test locally - latest release found (v0.21.3)

➜  arkade git:(convertPopeye) ./arkade get popeye                                     
Downloading: popeye
2024/05/10 12:39:35 Looking up version for popeye
2024/05/10 12:39:36 Found: v0.21.3
Downloading: https://github.com/derailed/popeye/releases/download/v0.21.3/popeye_Darwin_amd64.tar.gz
17.64 MiB / 17.64 MiB [---------------------------------------------------------------------------------------------] 100.00%
/var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-3605829447/popeye_Darwin_amd64.tar.gz written.
2024/05/10 12:40:09 Looking up version for popeye
2024/05/10 12:40:09 Found: v0.21.3
2024/05/10 12:40:09 Extracted: /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-3605829447/popeye
2024/05/10 12:40:09 Copying /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-3605829447/popeye to /Users/rgee0/.arkade/bin/popeye

Wrote: /Users/rgee0/.arkade/bin/popeye (60.24MB)

# Add arkade binary directory to your PATH variable
export PATH=$PATH:$HOME/.arkade/bin/

# Test the binary:
/Users/rgee0/.arkade/bin/popeye

# Or install with:
sudo mv /Users/rgee0/.arkade/bin/popeye /usr/local/bin/

πŸš€ Speed up GitHub Actions/GitLab CI + reduce costs: https://actuated.dev

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Maintenance

Documentation

  • I have updated the list of tools in README.md if (required) with ./arkade get --format markdown
  • I have updated the list of apps in README.md if (required) with ./arkade install --help

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have tested this on arm, or have added code to prevent deployment

Signed-off-by: Richard Gee <richard@technologee.co.uk>
@rgee0
Copy link
Contributor Author

rgee0 commented May 11, 2024

Closing as this was a bit of a spike, and the version strategy approach has changed since. Will incorporate the arch and tests for popeye in a later change

@rgee0 rgee0 closed this May 11, 2024
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.

None yet

1 participant