adikari / monorepo-diff-buildkite-plugin

Run separate pipelines for each folder in your monorepo
MIT License
202 stars 78 forks source link

Ensure os type is always lowercase. #139

Closed jmctune closed 3 weeks ago

jmctune commented 1 year ago

This fixes an issue where uname -s provides a result of capital Linux as seen here:

$ uname -s
Linux

We're running a Debian variant where this is true for our agent:

$ cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Without this change, we are unable to use the latest version of this plugin because of this error message in the command hook:

curl: (22) The requested URL returned error: 404
--
  | failed to download https://github.com/monebag/monorepo-diff-buildkite-plugin/releases/download/latest/monorepo-diff-buildkite-plugin_Linux_amd64

This is because the published binaries use lowercase "linux":

image

I also find it a little wild that every invocation of this plugin is making a call to download a file from this repository and will open an issue to address that.

jmctune commented 11 months ago

@adikari Hello, could I get a review on this? We're stuck on a previous version until this is fixed.