From d4a93d8ab386738610b025e93b6a81e21085d78a Mon Sep 17 00:00:00 2001 From: "Viktor A. Rozenko Voitenko" Date: Mon, 29 Jan 2024 14:23:40 +0300 Subject: [PATCH] fix(--add): for some users the library didn't do a good job --- .goreleaser.yaml | 10 ---------- PKGBUILD | 2 +- agent/agent.go | 11 +---------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f7c675d..4b7009d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,11 +1,6 @@ -# This is an example .goreleaser.yml file with some sensible defaults. -# Make sure to check the documentation at https://goreleaser.com before: hooks: - # You may remove this if you don't use go modules. - go mod tidy - # you may remove this if you don't need go generate - - go generate ./... builds: - goos: @@ -57,8 +52,3 @@ changelog: exclude: - '^docs' - '^test' - -# The lines beneath this are called `modelines`. See `:help modeline` -# Feel free to remove those if you don't want/use them. -# yaml-language-server: $schema=https://goreleaser.com/static/schema.json -# vim: set ts=2 sw=2 tw=0 fo=cnqoj diff --git a/PKGBUILD b/PKGBUILD index 1cbfd25..ec009ac 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Viktor A. Rozenko Voitenko pkgname=sema -pkgver=3.0.0 +pkgver=3.1.0 pkgrel=19 pkgdesc="Semantic commit tool" arch=(x86_64) diff --git a/agent/agent.go b/agent/agent.go index 240e17e..4776f4d 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -55,16 +55,7 @@ func (a *Agent) Title() error { } func (a *Agent) Add() error { - status, err := a.workTree.Status() - if err != nil { - return fmt.Errorf("failed to obtain repository status: %s", err) - } - for file := range status { - if _, err = a.workTree.Add(file); err != nil { - return fmt.Errorf("failed to stage file: %s", err) - } - } - return nil + return try(exec.Command("git", "add", ".")) } func (a *Agent) Commit() error {