Unverified Commit a457f213 authored by Atemu's avatar Atemu Committed by GitHub
Browse files

Merge pull request #329929 from flohessling/fix-sessionmanagerplugin-build

ssm-session-manager-plugin: fix executable name
parents 36e3f181 5a863267
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -53,8 +53,14 @@ buildGoModule rec {
  doCheck = true;
  checkFlags = [ "-skip=TestSetSessionHandlers" ];

  # The AWS CLI is expecting the binary name to be 'session-manager-plugin' and
  # since the outfile is different the following workaround is renaming the binary.
  postBuild = ''
    mv $GOPATH/bin/sessionmanagerplugin-main $GOPATH/bin/${meta.mainProgram}
  '';

  preCheck = ''
    if ! [[ $($GOPATH/bin/sessionmanagerplugin-main --version) = ${lib.escapeShellArg version} ]]; then
    if ! [[ $($GOPATH/bin/${meta.mainProgram} --version) = ${lib.escapeShellArg version} ]]; then
      echo 'wrong version'
      exit 1
    fi