Code Monkey home page Code Monkey logo

Comments (6)

andy31415 avatar andy31415 commented on August 22, 2024

The trick is to decide what version to expose here ... current version command line handling prints out hard-coded text I believe, which is only useful among manjor versions (which we probably could change), however that also creates churn (keep updating the version file).

To avoid churn, we had various requests to use git versions/info/logs for this however we intentionally avoided this due to slowing down builds (we try hard to not execute extra programs) and making builds potentially less reproducible (different output on the same code, depending on git checkout status/state).

The closest equivalent is defining an argument and allowing build systems to override it (and builds system may choose to take the extra time to figure out a good tag). sl_matter_version_str is an example of this being done ( it is slow when used, adds extra churn to maintain the version in the builder script).

from connectedhomeip.

bzbarsky-apple avatar bzbarsky-apple commented on August 22, 2024

@resghst Where is the chip-tool coming from whose version you want to know? Understanding that will make it easier to figure out how best to address this.

from connectedhomeip.

resghst avatar resghst commented on August 22, 2024

Sometimes, I built the chip-tool a few months ago. I only leave the chip-tool bin file, so I can not easily get the chip-tool version.

For instance, the chip-tool builds from:

  • the hash code: b63c271
  • the nearest tag: v1.3.0.0
  • branch: master

I holp chip-tool version command will show: master-v1.3.0.0-b63c271
at least show the hash code.

Thanks reply, @bzbarsky-apple @andy31415

from connectedhomeip.

resghst avatar resghst commented on August 22, 2024

I think only project-chip git-hash will fine

from connectedhomeip.

bzbarsky-apple avatar bzbarsky-apple commented on August 22, 2024

@resghst Build it into a directory whose name is the SHA?

from connectedhomeip.

resghst avatar resghst commented on August 22, 2024

for example, the following command can control the node 1 endpoint 1.
$ ./chip-tool onoff on 1 1
I want get the chip-tool version with
$ ./chip-tool version
it will return "master-v1.3.0.0-b63c271" or "b63c271"
 
The chip-tool has many modules, so we may let the version become a command group.
$ ./chip-tool version <module_name>

from connectedhomeip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.