Skip to content

Commit

Permalink
add logging to build.vsh, make it more single purpose, by removing gi…
Browse files Browse the repository at this point in the history
…t commiting from it (it will be done by fast.v)
  • Loading branch information
spytheman committed Apr 26, 2024
1 parent e27bb7e commit 2e3342a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions build.vsh
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import os
import log

commit_res := os.execute('git ls-remote -h https://github.com/vlang/v.git refs/heads/master')
latest_v_commit_hash := commit_res.output.all_before('\t')#[..7]
println('Latest V master commit hash: ${latest_v_commit_hash}')
log.info('start generating html pages from docs.md')

log.info(' cloning latest version of the generator sources ...')
os.system('rm -rf docs_generator/')
os.system('git clone --branch generator https://github.com/vlang/docs docs_generator/')
os.chdir('docs_generator/')!

os.chdir('docs_generator/')!
log.info(' installing dependencies ...')
os.system('v install')
log.info(' runnning generator...')
os.system('v run .')
os.chdir('..')!

log.info(' rsync-ing the output/ folder ...')
os.system('rsync -a docs_generator/output/ ./')
os.system('git add .')
os.system('git commit -m "${latest_v_commit_hash} - update doc pages"')

println('Done')
log.info('done generating html pages from docs.md')

0 comments on commit 2e3342a

Please sign in to comment.