cos-dkms: Add --latest flag for package version

This will select the latest compatible version of a package from the
local DKMS tree or the DKMS tree in a GCS bucket, if provided. This
allows users to have versioned packages in their DKMS tree without
needing to update their build scripts as newer versions are added.

In addition, this cleans up install.go by moving the version-related
logic to its own file in versions.go.

BUG=b/349400483
TEST=presubmit

Change-Id: Ia32cf0c3e50b6fbdb722891c2c083cadfe5241dd
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/86264
Reviewed-by: Oleksandr Tymoshenko <ovt@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
Tested-by: Kevin Berry <kpberry@google.com>
7 files changed
tree: f0b3858a30f66bd9c94a5f2bb9b8a677a98eb093
  1. coverage/
  2. release/
  3. src/
  4. testing/
  5. .gitignore
  6. BUILD.bazel
  7. cloudbuild.yaml
  8. CONTRIBUTING.md
  9. deps.bzl
  10. go.mod
  11. go.sum
  12. LICENSE
  13. postsubmit-cloudbuild.yaml
  14. README.md
  15. run_tests.sh
  16. run_unit_tests.sh
  17. WORKSPACE
README.md

Tools for Container-Optimized OS

This is a repository of various tools developed for Container-Optimized OS. Examples include cos-gpu-installer, cos-toolbox, etc.

See CONTRIBUTING.md for how to contribute.