Skip to content

Commit

Permalink
fix: do not "git add" all files not yet committed
Browse files Browse the repository at this point in the history
Fixes #17

Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Oct 25, 2023
1 parent a504c05 commit 526509d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up PDM
uses: pdm-project/setup-pdm@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- run: npx changelogithub
continue-on-error: true
Expand Down
6 changes: 2 additions & 4 deletions src/monas/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ def diff(self, ref: str) -> list[str]:

def commit(self, message: str) -> None:
"""Commit the changes."""
self.repo.git.add(".")
self.repo.git.add("-u")
self.repo.git.commit(m=message)

def tag(self, tag: str, message: str) -> None:
self.repo.git.tag(tag, a=True, m=message)

def push(self, including_tags: bool = True) -> None:
self.repo.git.push()
if including_tags:
self.repo.git.push("--tags")
self.repo.git.push(follow_tags=including_tags)

0 comments on commit 526509d

Please sign in to comment.