Unitech / Unitech/pm2

Ability to set process version on start

Open
#3,941 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T: Feature
Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

What's going wrong?

Nothing is wrong, this is an extension / feature request for existing functionality

How could we reproduce this issue?

This is a feature request for packages not using semver in package.json.

The new version display provided in #3927 is awsome but only works if a project has a version tracked inside the package.json file. Projects using other tracking - e.g. Git short hashes cannot populate this field when the process starts.

Is it possible to extend the existing pm2 start <process> CLI / API to also include specifying the version - similar to how setting the process name currently works? I would imagine this to take the form:

pm2 start --name 'My precious app' --version `git log -1 --pretty=format:%h` app.js

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing pm2 start <process> CLI/API and the version display introduced in #3927. Determine how the current start options populate the process version, then make the requested version value available for projects that do not use semver in package.json; done means the supplied value is shown when the process starts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.