Add Git hash to builds

This commit is contained in:
Marks Polakovs 2020-04-23 22:14:32 +02:00
parent 5ece897b2e
commit ad2010bfcc
2 changed files with 5 additions and 2 deletions

4
Jenkinsfile vendored
View file

@ -51,7 +51,7 @@ pipeline {
}
steps {
sh 'sed -i -e \'s/ury.org.uk\\/webstudio/ury.org.uk\\/webstudio-dev/\' package.json'
sh 'yarn build'
sh 'REACT_APP_GIT_SHA=`git rev-parse --short HEAD` yarn build'
sshagent(credentials: ['ury']) {
sh 'rsync -av --delete-after build/ deploy@ury:/usr/local/www/webstudio-dev'
}
@ -71,7 +71,7 @@ pipeline {
}
steps {
sh 'sed -i -e \'s/ury.org.uk\\/webstudio-dev/ury.org.uk\\/webstudio/\' package.json'
sh 'yarn build'
sh 'REACT_APP_GIT_SHA=`git rev-parse --short HEAD` yarn build'
sshagent(credentials: ['ury']) {
sh 'rsync -av --delete-after build/ deploy@ury:/usr/local/www/webstudio'
}

View file

@ -18,6 +18,9 @@ export function AboutTab() {
<div>
<b>WebStudio v{process.env.REACT_APP_VERSION}</b>
</div>
<div>
<b>Git hash:</b> <code>{process.env.REACT_APP_GIT_SHA}</code>
</div>
<div>
MyRadio endpoint: <code>{MYRADIO_BASE_URL}</code>/
<code>{MYRADIO_NON_API_BASE}</code>