finalize_sdk.py: correctly escape --readme argument
finalize_sdk.py will include the command line used in the commit messages it creates. However, it fails to correctly esacpe the arguments. Correct this. Before: ... -r This is some text ... After: ... -r 'This is some text' ... Test: manual: run finalize_sdk.py, check commit message in prebuilts/sdk Change-Id: I67f1dd5fe8b36658c76cdcfa31a6c8fbc610621a
This commit is contained in:
@@ -4,6 +4,7 @@ import argparse
|
|||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@@ -105,7 +106,7 @@ args = parser.parse_args()
|
|||||||
|
|
||||||
build_target = BUILD_TARGET_TRAIN if args.bid[0] == 'T' else BUILD_TARGET_CONTINUOUS
|
build_target = BUILD_TARGET_TRAIN if args.bid[0] == 'T' else BUILD_TARGET_CONTINUOUS
|
||||||
branch_name = 'finalize-%d' % args.finalize_sdk
|
branch_name = 'finalize-%d' % args.finalize_sdk
|
||||||
cmdline = " ".join([x for x in sys.argv if x not in ['-a', '--amend_last_commit']])
|
cmdline = shlex.join([x for x in sys.argv if x not in ['-a', '--amend_last_commit']])
|
||||||
commit_message = COMMIT_TEMPLATE % (args.finalize_sdk, args.bid, cmdline, args.bug)
|
commit_message = COMMIT_TEMPLATE % (args.finalize_sdk, args.bid, cmdline, args.bug)
|
||||||
module_names = args.modules or ['*']
|
module_names = args.modules or ['*']
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user