mycoralhealth / mycoral-patient

Mobile app for patients to interact with Coral Health blockchain
17 stars 7 forks source link

Show version in app #59

Closed lukecyca closed 6 years ago

lukecyca commented 6 years ago

It's hard to know what version is running. We should burn an identifier into each build.

We could use any available env var from TravisCI, such as $TRAVIS_BRANCH:$TRAVIS_COMMIT or $TRAVIS_BUILD_NUMBER.

Then in a build script do something like:

echo "var version = '$TRAVIS_BRANCH:$TRAVIS_COMMIT';" > src/version.js
exp publish

Then from our app's settings screen (or some other spot out-of-the-way) we can import that variable and display the version.

lukecyca commented 6 years ago

This is mostly done in #62.

However the version.js is still static and will need to be bumped manually. It would be good to have it updated/enforced by the build system based on git tags/branches/commits.

grcevski commented 6 years ago

I agree completely, that was just the UI part :).

lukecyca commented 6 years ago

We should pull the version from the app.json instead, to avoid unnecessary duplication and confusion if they are out of sync.