File tree 2 files changed +10
-13
lines changed
2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -126,13 +126,6 @@ def parse_command_line(argv):
126
126
default = None ,
127
127
help = "The conda platform to check existing recipes for." ,
128
128
)
129
- parser .add_argument (
130
- "-z" ,
131
- "--snapshot" ,
132
- dest = "snapshot" ,
133
- default = None ,
134
- help = "The version snapshot file (default: None)."
135
- )
136
129
arguments = parser .parse_args (argv [1 :])
137
130
global selected_platform
138
131
config .parsed_args = arguments
@@ -226,12 +219,12 @@ def read_vinca_yaml(filepath):
226
219
return vinca_conf
227
220
228
221
229
- def read_snapshot (filepath ):
230
- if not filepath :
222
+ def read_snapshot (vinca_conf ):
223
+ if not "rosdistro_snapshot" in vinca_conf :
231
224
return None
232
225
233
226
yaml = ruamel .yaml .YAML ()
234
- snapshot = yaml .load (open (filepath , "r" ))
227
+ snapshot = yaml .load (open (vinca_conf [ "rosdistro_snapshot" ] , "r" ))
235
228
return snapshot
236
229
237
230
@@ -868,8 +861,7 @@ def main():
868
861
base_dir = os .path .abspath (arguments .dir )
869
862
vinca_yaml = os .path .join (base_dir , "vinca.yaml" )
870
863
vinca_conf = read_vinca_yaml (vinca_yaml )
871
-
872
- snapshot = read_snapshot (arguments .snapshot )
864
+ snapshot = read_snapshot (vinca_conf )
873
865
874
866
from .template import generate_bld_ament_cmake
875
867
from .template import generate_bld_ament_python
Original file line number Diff line number Diff line change 1
1
import argparse
2
2
import yaml
3
+ import datetime
3
4
from .distro import Distro
4
5
5
6
@@ -30,7 +31,7 @@ def main():
30
31
"--output" ,
31
32
type = str ,
32
33
dest = "output" ,
33
- default = "snapshot .yaml" ,
34
+ default = "rosdistro_snapshot .yaml" ,
34
35
help = "Output file to write dependencies to" ,
35
36
required = False ,
36
37
)
@@ -44,6 +45,9 @@ def main():
44
45
)
45
46
args = parser .parse_args ()
46
47
48
+ # Get the current UTC time
49
+ utc_time = datetime .datetime .utcnow ().strftime ("%Y-%m-%dT%H:%M:%SZ" )
50
+
47
51
distro = Distro (args .distro )
48
52
49
53
if args .package is None :
@@ -72,4 +76,5 @@ def main():
72
76
print ("{0:{2}} {1}" .format (dep , version , max_len + 2 ))
73
77
74
78
with open (args .output , "w" ) as f :
79
+ f .write (f"# Snapshot generated by vinca-snapshot on { utc_time } UTC for distro { args .distro } \n " )
75
80
yaml .dump (output , f )
You can’t perform that action at this time.
0 commit comments