ci: use versioned cargo wrapper for crate ordering

This commit is contained in:
Trent Nelson 2021-06-21 21:14:20 -06:00 committed by Trent Nelson
parent d269975784
commit 554002b73c
1 changed files with 6 additions and 2 deletions

View File

@ -12,10 +12,14 @@ import json
import subprocess
import sys;
real_file = os.path.realpath(__file__)
ci_path = os.path.dirname(real_file)
src_root = os.path.dirname(ci_path)
def load_metadata():
cmd = f'{src_root}/cargo metadata --no-deps --format-version=1'
return json.loads(subprocess.Popen(
'cargo metadata --no-deps --format-version=1',
shell=True, stdout=subprocess.PIPE).communicate()[0])
cmd, shell=True, stdout=subprocess.PIPE).communicate()[0])
def get_packages():
metadata = load_metadata()