Add "spack versions --new" flag to only show new versions (#20030)

* [cmd versions] add spack versions --new flag to only fetch new versions

format

[cmd versions] rename --latest to --newest and add --remote-only

[cmd versions] add tests for --remote-only and --new

format

[cmd versions] update shell tab completion

[cmd versions] remove test for --remote-only --new which gives empty output

[cmd versions] final rename

format

* add brillig mock package

* add test for spack versions --new

* [brillig] format

* [versions] increase test coverage

* Update lib/spack/spack/cmd/versions.py

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>

* Update lib/spack/spack/cmd/versions.py

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
vvolkl
2020-12-07 16:29:10 +01:00
committed by GitHub
parent b4ed4fb226
commit ed258ca9e9
4 changed files with 80 additions and 18 deletions

View File

@@ -0,0 +1,17 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Brillig(Package):
""" Mock package to test the spack versions command."""
homepage = "https://www.example.com"
url = "https://github.com/vvolkl/brillig/archive/v2.0.0.tar.gz"
version('2.0.0', sha256='d4bb8f1737d5a7c0321e1675cceccb59dbcb66a94f3a9dd66a37f58bc6df7f15')
version('1.0.0', sha256='fcef53f45e82b881af9a6f0530b2732cdaf8c5c60e49b27671594ea658bfe315')