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

shellhub-agent: add update.sh script #108080

Merged
merged 1 commit into from Jan 2, 2021

Conversation

otavio
Copy link
Contributor

@otavio otavio commented Dec 31, 2020

Motivation for this change

I am learning more about how to ease the maintainer's life and I am then adding the new script here so we can easily upgrade to the new releases when they are made.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

genericUpdater does most of this and can easily be added in a few lines. Please use this.

Also there is nix-update which can do this in one command without any extra scripts like so: nix-update shellhub-agent

@jonringer
Copy link
Contributor

you will probably just want to add this to the derivation:

  passthru = {
    updateScript = nix-update-script {
      attrPath = pname;
    };
  };

@otavio otavio force-pushed the shellhub-agent/update-script branch from 397f3c3 to 330352c Compare January 1, 2021 05:07
@otavio
Copy link
Contributor Author

otavio commented Jan 1, 2021

Thanks @SuperSandro2000 and @jonringer. The hint about the generic-updater was great. I reworked the commit with it.

@thiagokokada
Copy link
Contributor

Fix the commit text, since now you're not adding a update.sh script.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
@otavio otavio force-pushed the shellhub-agent/update-script branch from cb1b1fb to 13a1c7c Compare January 1, 2021 14:59
@otavio
Copy link
Contributor Author

otavio commented Jan 1, 2021

Thanks @thiagokokada, please recheck it.

@jonringer jonringer merged commit d6de45d into NixOS:master Jan 2, 2021
@otavio otavio deleted the shellhub-agent/update-script branch February 2, 2021 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants