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

How can I use it purely locally #734

Open
Deran80 opened this issue Oct 13, 2023 · 4 comments
Open

How can I use it purely locally #734

Deran80 opened this issue Oct 13, 2023 · 4 comments
Labels
confirmed Prevent from becoming stale question

Comments

@Deran80
Copy link

Deran80 commented Oct 13, 2023

Hello,

how can I use python-semantic-release without a remote repository?
Or with a 'local' remote repository / directory (git init --bare)?
Due to company guidelines I'm not allowed to upload the code to github.

If I dont't add a remote repository, I get the error 'ValueError: Remote named 'origin' didn't exist'
If I add a local directory as a remote repository, I get the error 'ValueError: Cannot parse ...' because it doesn't match an url pattern.
Although I get these errors, python-semantic-release increments the version number, but it doesn't create a changelog.
Git can push to the directory.

Is there a trick how I can get this working?

Thanks in advance.

@codejedi365
Copy link
Contributor

codejedi365 commented Dec 8, 2023

This is an interesting question. There might be something you can do. With the latest version v8.5.0, try the following:

semantic-release version --no-push
git push --tags

semantic-release should:

  • Evaluate your commits for the next version
  • Stamp the version into any files (if configured)
  • Run the build_command
  • Create a changelog Currently uses hvcs_client for the Context builder
  • Commit the changelog, and any changed files with a version commit
  • Tag the new commit

Due to the --no-push, semantic-release stops here. Given the changelog generator uses the remote VCS for context it will cause you problems. I might be able to get something working...

@codejedi365
Copy link
Contributor

@Deran80, I got a concept working that will support your offline use. I am still working on the testing but soon I'll have a PR and a release that you can use.

codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Dec 14, 2023
adjust default configurations to allow for a `none` value of a remote vcs. It will
disable any functionality related to publishing remotely.

Resolves: python-semantic-release#734
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Dec 17, 2023
adjust default configurations to allow for a `none` value of a remote vcs. It will
disable any functionality related to publishing remotely.

Resolves: python-semantic-release#734
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Dec 22, 2023
adjust default configurations to allow for a `none` value of a remote vcs. It will
disable any functionality related to publishing remotely.

Resolves: python-semantic-release#734
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Dec 23, 2023
adjust default configurations to allow for a `none` value of a remote vcs. It will
disable any functionality related to publishing remotely.

Resolves: python-semantic-release#734
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Jan 4, 2024
adjust default configurations to allow for a `none` value of a remote vcs. It will
disable any functionality related to publishing remotely.

Resolves: python-semantic-release#734
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Mar 8, 2024
adjust default configurations to allow for a `none` value of a remote vcs. It will
disable any functionality related to publishing remotely.

Resolves: python-semantic-release#734
codejedi365 added a commit to codejedi365/python-semantic-release that referenced this issue Mar 19, 2024
adjust default configurations to allow for a `none` value of a remote vcs. It will
disable any functionality related to publishing remotely.

Resolves: python-semantic-release#734
@github-actions github-actions bot added the stale label Mar 25, 2024
@codejedi365 codejedi365 added confirmed Prevent from becoming stale and removed stale labels Mar 27, 2024
Copy link

It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label May 27, 2024
@codejedi365
Copy link
Contributor

This is actually very close to resolution after some refactors of the base interface classes. Still requires testing and updates to the latest interface.

Unfortunately lower on the priority compared to some current and recent issues.

@github-actions github-actions bot removed the needs-update Needs status update from maintainers label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Prevent from becoming stale question
Projects
None yet
Development

No branches or pull requests

2 participants