ActiveBrainAtlas2 / activebrainatlasadmin

This is the ActiveBrainAtlas database portal. This project provides the admin area to edit data associated with the Active Brain Atlas project. It also provides the REST API.
0 stars 1 forks source link

add build version to Ng -for user to see #220

Closed drinehart1 closed 8 months ago

drinehart1 commented 8 months ago

Main Ng branch has this:

Issue: https://github.com/google/neuroglancer/issues/468

The build version is displayed at top help menu (pressing 'h' in interface)

To accomplish this we need to add event binding to src code: Binding can be found in file: src/help/input_event_bindings.ts (https://github.com/google/neuroglancer/blob/45f6578bd80f12284cf19cb1d3a395cc73fe14e0/src/help/input_event_bindings.ts#L32)

We also need to compile using the following code: build_info="{'tag':'$(git describe --always --tags)', 'url':'https://github.com/google/neuroglancer/commit/$(git rev-parse HEAD)', 'timestamp':'$(date)'}" npm run build-python -- --no-typecheck --define NEUROGLANCER_BUILD_INFO="${build_info}"

Every version we create will need a tag in github as well.

Effectively if we a) add tags to our code, b) modify our node build script to pull from tag; and c) add event binding to input_event_bindings.ts to display the build version we will have versions in brainsharer Ng code and pull a little closer to main branch

eddyod commented 8 months ago

I added this to the demo version running at: https://demo.brainsharer.org/ng/

I also put the tag and build time in the title bar so the users can easily see it. You need to compile with the deploy.sh script I created for this to work.

drinehart1 commented 8 months ago

I think deployment looks good. We may need to adjust font (smaller so consistent with existing) and put in actual version numbers 1.x, based on feedback. Thanks - I'll leave bug open until after presented at next Ng collab meeting

drinehart1 commented 8 months ago

To address the actual version number (which we have), would you be opposed to using:

BUILD_INFO="{'tag':'DEMO version:$(git tag --sort=version:refname)', 'url':'https://github.com/BrainSharer/BrainsharerMonoRepo/commits/$(git tag --sort=version:refname)', 'timestamp':'$(date)'}"

This will reverse sort by latest version number in github and capture that version. Currently we have v.0.1 but so long as we agree on what constitutes a major/minor version and maintain consistency, this should work.

eddyod commented 8 months ago

Using that, here is the build info for the demo version:

{'tag':'Production Version v0.1', 'url':'https://github.com/BrainSharer/BrainsharerMonoRepo/commit/0b68a9ae03e04b275f002923651a7b31e4678669', 'timestamp':'Fri Jan 19 06:35:18 AM +07 2024'}

and for the production version:

{'tag':'Production Version v0.1', 'url':'https://github.com/BrainSharer/BrainsharerMonoRepo/commit/0b68a9ae03e04b275f002923651a7b31e4678669', 'timestamp':'Fri Jan 19 06:35:18 AM +07 2024'}

eddyod commented 8 months ago

That is on the demo version: https://demo.brainsharer.org