mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: change all '$expr' to '${expr}' (#16428)
This commit is contained in:
@@ -72,7 +72,7 @@ const cache_oldv_folder_vc = os.join_path(cache_oldv_folder, 'vc')
|
||||
fn sync_cache() {
|
||||
scripting.verbose_trace(@FN, 'start')
|
||||
if !os.exists(cache_oldv_folder) {
|
||||
scripting.verbose_trace(@FN, 'creating $cache_oldv_folder')
|
||||
scripting.verbose_trace(@FN, 'creating ${cache_oldv_folder}')
|
||||
scripting.mkdir_all(cache_oldv_folder) or {
|
||||
scripting.verbose_trace(@FN, '## failed.')
|
||||
exit(1)
|
||||
@@ -82,16 +82,16 @@ fn sync_cache() {
|
||||
for reponame in ['v', 'vc'] {
|
||||
repofolder := os.join_path(cache_oldv_folder, reponame)
|
||||
if !os.exists(repofolder) {
|
||||
scripting.verbose_trace(@FN, 'cloning to $repofolder')
|
||||
scripting.exec('git clone --quiet https://github.com/vlang/$reponame $repofolder') or {
|
||||
scripting.verbose_trace(@FN, '## error during clone: $err')
|
||||
scripting.verbose_trace(@FN, 'cloning to ${repofolder}')
|
||||
scripting.exec('git clone --quiet https://github.com/vlang/${reponame} ${repofolder}') or {
|
||||
scripting.verbose_trace(@FN, '## error during clone: ${err}')
|
||||
exit(1)
|
||||
}
|
||||
}
|
||||
scripting.chdir(repofolder)
|
||||
scripting.exec('git pull --quiet') or {
|
||||
scripting.verbose_trace(@FN, 'pulling to $repofolder')
|
||||
scripting.verbose_trace(@FN, '## error during pull: $err')
|
||||
scripting.verbose_trace(@FN, 'pulling to ${repofolder}')
|
||||
scripting.verbose_trace(@FN, '## error during pull: ${err}')
|
||||
exit(1)
|
||||
}
|
||||
}
|
||||
@@ -150,11 +150,11 @@ fn main() {
|
||||
} else {
|
||||
context.commit_v = scripting.run('git rev-list -n1 HEAD')
|
||||
}
|
||||
scripting.cprintln('################# context.commit_v: $context.commit_v #####################')
|
||||
scripting.cprintln('################# context.commit_v: ${context.commit_v} #####################')
|
||||
context.path_v = vgit.normalized_workpath_for_commit(context.vgo.workdir, context.commit_v)
|
||||
context.path_vc = vgit.normalized_workpath_for_commit(context.vgo.workdir, 'vc')
|
||||
if !os.is_dir(context.vgo.workdir) {
|
||||
eprintln('Work folder: $context.vgo.workdir , does not exist.')
|
||||
eprintln('Work folder: ${context.vgo.workdir} , does not exist.')
|
||||
exit(2)
|
||||
}
|
||||
ecc := os.getenv('CC')
|
||||
@@ -168,7 +168,7 @@ fn main() {
|
||||
context.compile_oldv_if_needed()
|
||||
scripting.chdir(context.path_v)
|
||||
shorter_hash := context.commit_v_hash[0..10]
|
||||
scripting.cprintln('# v commit hash: $shorter_hash | folder: $context.path_v')
|
||||
scripting.cprintln('# v commit hash: ${shorter_hash} | folder: ${context.path_v}')
|
||||
if context.cmd_to_run.len > 0 {
|
||||
scripting.cprintln_strong('# command: ${context.cmd_to_run:-34s}')
|
||||
cmdres := os.execute_or_exit(context.cmd_to_run)
|
||||
|
||||
Reference in New Issue
Block a user