semantic-release / semantic-release/git

var on assets path ?

Open
#339 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
339
Forks
75
Avg merge
5h 15m
Merged PRs (30d)
6

Description

I can't find a simple way to use the package name to create a path. In order to use it as an asset.

here is a part 'prepare' of .releaserc.yml

prepare:
  - path: '@semantic-release/exec'
    prepareCmd: "echo '__version__ = \"${nextRelease.version}\"' > $CI_PROJECT_NAME/version.py"
  - path: '@semantic-release/changelog'
    # Create or update the changelog file in the local project repository
  - path: '@semantic-release/git'
    # Push a release commit and tag, including version files
    # Do not forget to put `[skip ci]` to avoid CI/CD infinite loop
    message: 'chore(release): ${nextRelease.version} [skip ci]'
    assets: ['CHANGELOG.md', '$CI_PROJECT_NAME/version.py']

Here :
assets: ['CHANGELOG.md', '$CI_PROJECT_NAME/version.py']
i cant' use env var like this, there is another way ?

Note:
prepareCmd work well with $CI_PROJECT_NAME.

Contributor guide

No contributing guide indexed for this repository

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 .releaserc.yml example, comparing how prepareCmd expands $CI_PROJECT_NAME with how the git plugin reads the assets list. Determine whether asset paths can use the package or environment name, and consider the configuration behavior needed so the generated version.py path is accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript
Domain
ci-cd, release
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.