Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f05582b50f |
@@ -28,6 +28,12 @@ jobs:
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v8.3.2
|
||||
|
||||
- name: Count commits
|
||||
run: |
|
||||
echo "Commit count: $(git rev-list --count main)"
|
||||
echo "Tags available:"
|
||||
git tag
|
||||
|
||||
- name: Bump version
|
||||
run: |
|
||||
uv run git-flow tag --token="${{ secrets.GITEA_TOKEN }}"
|
||||
|
||||
@@ -50,4 +50,6 @@ SUPPORTED_REMOTE_APIS = [
|
||||
|
||||
REPOSITORY_TOKEN_FILENAME = ".repository-token"
|
||||
|
||||
FLOWCONFIG_FILENAME = ".flowconfig"
|
||||
|
||||
FLOWCONFIG_VERSION = 2
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from git_flow import (
|
||||
BRANCH_TYPES,
|
||||
REPOSITORY_TOKEN_FILENAME,
|
||||
FLOWCONFIG_FILENAME,
|
||||
FLOWCONFIG_VERSION,
|
||||
COMMIT_TYPES,
|
||||
GitFlowError,
|
||||
@@ -18,7 +19,7 @@ import rich
|
||||
import rich.panel
|
||||
import questionary
|
||||
|
||||
flowconfig = Git.get_config()
|
||||
flowconfig = Git.get_config(FLOWCONFIG_FILENAME) if isfile(FLOWCONFIG_FILENAME) else {}
|
||||
environments = (
|
||||
flowconfig["flow.branches"].split(",") if "flow.branches" in flowconfig else []
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import typer
|
||||
|
||||
import git_flow.command.base as base
|
||||
from git_flow import FLOWCONFIG_VERSION, GitFlowError
|
||||
from git_flow import FLOWCONFIG_FILENAME, FLOWCONFIG_VERSION, GitFlowError
|
||||
from git_flow.git import Git
|
||||
|
||||
app = typer.Typer()
|
||||
@@ -27,7 +27,9 @@ def init():
|
||||
flowconfig["flow.remote"] = remote
|
||||
flowconfig["flow.remote-type"] = remote_type
|
||||
|
||||
Git.set_config(flowconfig)
|
||||
Git.set_config(flowconfig, FLOWCONFIG_FILENAME)
|
||||
Git("add", FLOWCONFIG_FILENAME).exec()
|
||||
Git("commit", message="feature: initialize git-flow").exec()
|
||||
|
||||
_ensure_all_flow_branches_exist(branches, remote)
|
||||
|
||||
|
||||
+6
-1
@@ -1,5 +1,6 @@
|
||||
import subprocess
|
||||
|
||||
from git_flow import FLOWCONFIG_FILENAME
|
||||
from git_flow.io import *
|
||||
|
||||
|
||||
@@ -32,7 +33,11 @@ class Git:
|
||||
@staticmethod
|
||||
def set_config(config: dict[str, str], file: str | None = None):
|
||||
for key, value in config.items():
|
||||
Git("config", key, value, file=file).exec(print="Updating config")
|
||||
Git("config", key, value, file=file).exec()
|
||||
|
||||
@staticmethod
|
||||
def flow_config(*args, **kwargs):
|
||||
return Git("config", *args, file=FLOWCONFIG_FILENAME, **kwargs)
|
||||
|
||||
@staticmethod
|
||||
def get_current_branch():
|
||||
|
||||
Reference in New Issue
Block a user