Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compute libyear command #97

Closed
edwinkortman opened this issue Jun 13, 2022 · 0 comments · Fixed by #112
Closed

Add compute libyear command #97

edwinkortman opened this issue Jun 13, 2022 · 0 comments · Fixed by #112
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@edwinkortman
Copy link
Contributor

edwinkortman commented Jun 13, 2022

compute libyear

freshli compute libyear [filepath]

What does this command do?

The CycloneDX(SBOM) file passed to this command is generated by the bom:generate command. This file contains the Bill of Materials including the package URL.

This command will use the CycloneDX file to check each package what the current version is. It will use the packge URL for finding out what the current version is and which date it was released.

graph LR;
 subgraph what it should query
  queries-.-latest[What's the latest version? And it's release date?]
  queries-.-current[What's the currents version release date?]
 end

  subgraph different repositories
   Repositories-.-Composer
   Repositories-.-Bundler
   Repositories-.-Carton
   Repositories-.-Pip
   Repositories-.-NuGet
  end

 subgraph the flow
  purl[Package URL]-->Repository
  Repository-->query[Query info, find out where the code lives github.com etc.]
  query-->git[Ask git for the repository's tags and what date they were published]
  git-->calc[Calculate lib year]
 end
Loading

Command parameters

  • filepath: Filepath of CycloneDX file containing the BOM history.

Notes

Fetching repository info with bundler:

root ➜ /code (calculate-libyear) $ bundle info sqlite3

  * sqlite3 (1.4.2)

        Summary: This module allows Ruby programs to interface with the SQLite3 database engine (http://www.sqlite.org)

        Homepage: https://github.com/sparklemotion/sqlite3-ruby

        Path: /usr/local/bundle/gems/sqlite3-1.4.2

Fetching repository info with carton (https://metacpan.org/dist/carton/view/lib/Carton/Doc/Show.pod):

carton show Module
@edwinkortman edwinkortman self-assigned this Jun 13, 2022
@edwinkortman edwinkortman added the enhancement New feature or request label Jun 13, 2022
@mscottford mscottford added this to the v0.5.0 milestone Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants