File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)
6
6
7
7
## Unreleased
8
8
9
+ ## [ v3.1.0] - 2022-04-28
10
+
9
11
### Added
10
12
11
- - Added core linting messages from stac-check to stac-validator messages https://github.com/stac-utils/stac-validator/pull/201/
13
+ - Added update stac version message to cli output https://github.com/stac-utils/stac-validator/pull/211
12
14
13
15
### Fixed
14
16
Original file line number Diff line number Diff line change 2
2
3
3
from setuptools import setup
4
4
5
- __version__ = "3.0 .0"
5
+ __version__ = "3.1 .0"
6
6
7
7
with open ("README.md" , "r" ) as fh :
8
8
long_description = fh .read ()
34
34
"requests>=2.19.1" ,
35
35
"jsonschema>=3.2.0" ,
36
36
"click>=8.0.0" ,
37
+ "types-setuptools" ,
37
38
],
38
39
packages = ["stac_validator" ],
39
40
entry_points = {
Original file line number Diff line number Diff line change 1
- __version__ = "3.0.0"
Original file line number Diff line number Diff line change 2
2
import sys
3
3
4
4
import click # type: ignore
5
+ import pkg_resources
5
6
6
7
from .validate import StacValidate
7
8
8
9
10
+ def print_update_message (version ):
11
+ click .secho ()
12
+ if version != "1.0.0" :
13
+ click .secho (
14
+ f"Please upgrade from version { version } to version 1.0.0!" , fg = "red"
15
+ )
16
+ else :
17
+ click .secho ("Thanks for using STAC version 1.0.0!" , fg = "green" )
18
+ click .secho ()
19
+
20
+
9
21
@click .command ()
10
22
@click .argument ("stac_file" )
11
23
@click .option (
49
61
default = "" ,
50
62
help = "Save full recursive output to log file (local filepath)." ,
51
63
)
52
- @click .version_option (version = "3.0.0" )
64
+ @click .version_option (version = pkg_resources . require ( "stac-validator" )[ 0 ]. version )
53
65
def main (
54
66
stac_file ,
55
67
recursive ,
@@ -81,6 +93,8 @@ def main(
81
93
valid = stac .run ()
82
94
83
95
message = stac .message
96
+ if "version" in message [0 ]:
97
+ print_update_message (message [0 ]["version" ])
84
98
85
99
if no_output is False :
86
100
click .echo (json .dumps (message , indent = 4 ))
You can’t perform that action at this time.
0 commit comments