When we display azk version we do not have what exactly git commit version. This works well for released versions but for development azk version we need to know exactly what commit that we are running.
For this we will take the current commit being executed by git.
We also will include tests on spawn_helper and perhaps further improve the output of azk version
TODO:
[x] Create tests for Spawn Helper class
[x] Split printOutput and spawnAsync behavior. spawnAsync should only return command executed;
[x] Refactor all spawnAsync calls
[x] Create GitHelper class that calls Spawn Helper class
[x] Change azk version to return git commit id too
[x] Create a way to get commit id from released binary azk version
[x] git show -s --format="%ci" HEAD | tee get date from current commit
TODO Optional
[ ] Improve azk version to show more info [optional]
testing
# tests
azk gulp test --grep 'Azk cli, version'
azk gulp test --grep 'should _gitspawn_VersionAsync get real current git version'
azk gulp test --grep 'Spawn Helper'
azk gulp test --grep 'Git Helper'
azk gulp test --grep 'git version:'
# real world
rm -rf /tmp/azkdemo; azk start azukiapp/azkdemo /tmp/azkdemo --git-ref benchmark -vv; (cd /tmp/azkdemo; azk stop)
this closes #605
When we display
azk version
we do not have what exactlygit commit version
. This works well for released versions but for developmentazk
version we need to know exactly what commit that we are running.For this we will take the current commit being executed by git.
We also will include tests on
spawn_helper
and perhaps further improve the output ofazk version
TODO:
printOutput
andspawnAsync
behavior.spawnAsync
should only return command executed;spawnAsync
callsazk version
to returngit commit id
toogit show -s --format="%ci" HEAD | tee
get date from current commitTODO Optional
azk version
to show more info [optional]testing