From a4820c9724efcac95f24aafa44732139c118fcdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 16:53:16 +0500 Subject: [PATCH 01/14] the 'release.yml' file has been changed --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2a4182..f6e90e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,10 @@ jobs: go-version: '1.23.0' - name: Build auto-commit binary - run: go build -o ./bin/auto-commit . + run: | + sudo apt-get update && sudo apt-get install upx -y + go build -ldflags="-s -w" -trimpath -o ./bin/auto-commit . + upx --best --lzma ./bin/auto-commit - name: Set up Git run: | From 39c12f8cb63e6cf3575d07d630ffdf81eb077427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 17:01:25 +0500 Subject: [PATCH 02/14] changed the 'v2.5.x' branch --- update.go | 4 ++-- version.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/update.go b/update.go index 384f15a..97ff118 100644 --- a/update.go +++ b/update.go @@ -23,7 +23,7 @@ func AutoCommitUpdate() { return } - resp, err := http.Get(GITHUB_REPO_URL + "/releases/latest") + resp, err := http.Get(GITHUB_API_REPO_URL + "/releases/latest") if err != nil { ErrorLogger(fmt.Errorf("could not check latest version: %w", err)) return @@ -39,7 +39,7 @@ func AutoCommitUpdate() { } if strings.TrimSpace(string(version)) == strings.TrimSpace(data.TagName) { - fmt.Printf("\033[92myou have the latest version installed %s\033[0m\n", strings.TrimSpace(data.TagName)) + fmt.Printf("\033[33m[!] you have the latest version installed %s\033[0m\n", strings.TrimSpace(data.TagName)) return } diff --git a/version.go b/version.go index 9342f4d..0c40302 100644 --- a/version.go +++ b/version.go @@ -23,7 +23,7 @@ func GetVersion() { return } - fmt.Println("[git auto-commit] current version:", string(version)) + fmt.Println("[git auto-commit] current version:", strings.TrimSpace(string(version))) resp, err := http.Get(GITHUB_API_REPO_URL + "/releases/latest") if err != nil { @@ -41,7 +41,7 @@ func GetVersion() { } if strings.TrimSpace(string(version)) != strings.TrimSpace(data.TagName) { - fmt.Printf("\033[94ma new version is available: %s\033[0m\n", strings.TrimSpace(data.TagName)) - fmt.Printf("\033[92mplease update! 'git auto -u'\033[0m\n") + fmt.Printf("\033[33m[!] a new version is available: %s\033[0m\n", strings.TrimSpace(data.TagName)) + fmt.Printf("\033[33m[!] please update! 'git auto -u'\033[0m\n") } } From c61ef10a149ed768d3ece9790773f36606820ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:26:29 +0500 Subject: [PATCH 03/14] the 'update-windows-auto-commit.ps1' file has been changed | the 'update-linux-auto-commit.sh' file has been changed | the 'Makefile' file has been changed --- Makefile | 5 ++ scripts/update-linux-auto-commit.sh | 0 scripts/update-windows-auto-commit.ps1 | 68 ++++++++++++++++++++++++++ update.go | 24 ++------- 4 files changed, 76 insertions(+), 21 deletions(-) create mode 100644 scripts/update-linux-auto-commit.sh create mode 100644 scripts/update-windows-auto-commit.ps1 diff --git a/Makefile b/Makefile index ddb8e04..a6a0421 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,11 @@ buildrelease: @go build -ldflags="-s -w" -trimpath -o bin/auto-commit . @upx.exe --best --lzma bin/auto-commit +buildrelease-update: + @echo "Running release build update..." + @go build -ldflags="-s -w" -trimpath -o bin/auto-commit.update . + @upx.exe --best --lzma bin/auto-commit.update + test: @go test -v ./... diff --git a/scripts/update-linux-auto-commit.sh b/scripts/update-linux-auto-commit.sh new file mode 100644 index 0000000..e69de29 diff --git a/scripts/update-windows-auto-commit.ps1 b/scripts/update-windows-auto-commit.ps1 new file mode 100644 index 0000000..2abdfd5 --- /dev/null +++ b/scripts/update-windows-auto-commit.ps1 @@ -0,0 +1,68 @@ +# auto-commit.psm1 +$ErrorActionPreference = "Stop" + +$gitRoot = & git rev-parse --show-toplevel +Set-Location $gitRoot + +$proc = Get-Process "auto-commit" -ErrorAction SilentlyContinue +if ($proc) { + $proc | Stop-Process -Force + Start-Sleep -Seconds 2 +} + +$versionUrl = "https://api.github.com/repos/thefuture-industries/git-auto-commit/releases/latest" +$tag = (Invoke-RestMethod -Uri $versionUrl -UseBasicParsing).tag_name + +$Url = "https://github.com/thefuture-industries/git-auto-commit/releases/download/$tag/auto-commit" + +$HookName = "auto-commit" +$hookPath = Join-Path -Path ".git/hooks" -ChildPath $HookName +$versionFile = Join-Path -Path ".git/hooks" -ChildPath "auto-commit.version.txt" + +if (Test-Path $versionFile) { + $currentTag = Get-Content $versionFile | ForEach-Object { $_.Trim() } + if ($currentTag -eq $tag) { + Write-Host "[!] you have the latest version installed $tag" -ForegroundColor Yellow + exit 0 + } +} + +function Download-WithProgress { + param ( + [string]$url, + [string]$output + ) + + $req = [System.Net.HttpWebRequest]::Create($url) + $req.UserAgent = "git-auto-commit" + $resp = $req.GetResponse() + $total = $resp.ContentLength + $stream = $resp.GetResponseStream() + $outStream = [System.IO.File]::Open($output, [System.IO.FileMode]::Create) + + $buffer = New-Object byte[] 8192 + $read = 0 + $downloaded = 0 + $barWidth = 60 + + while (($read = $stream.Read($buffer, 0, $buffer.Length)) -gt 0) { + $outStream.Write($buffer, 0, $read) + $downloaded += $read + $percent = [math]::Round(($downloaded / $total) * 100) + $filled = [math]::Floor($barWidth * $percent / 100) + $empty = $barWidth - $filled + $bar = ('*' * $filled) + ('.' * $empty) + Write-Host -NoNewline "`rauto-commit update [$bar] $percent% " + } + + $outStream.Close() + $stream.Close() + Write-Host "" +} + +Download-WithProgress -url $Url -output $hookPath + +Set-Content -Path $versionFile -Value $tag + +git config --local alias.auto '!./.git/hooks/auto-commit' +Write-Host "successful upgrade to version $tag" diff --git a/update.go b/update.go index 97ff118..1c87c15 100644 --- a/update.go +++ b/update.go @@ -5,6 +5,7 @@ import ( "net/http" "os" "path/filepath" + "runtime" "strings" ) @@ -45,25 +46,6 @@ func AutoCommitUpdate() { fmt.Printf("updating to version %s...\n", strings.TrimSpace(data.TagName)) - binaryURL := GITHUB_REPO_URL + "/releases/download/" + strings.TrimSpace(data.TagName) + "/" + BINARY_AUTO_COMMIT - destPath := filepath.Join(root, ".git", "hooks", "auto-commit") - - if err := DownloadBinAutoCommit(binaryURL, destPath); err != nil { - ErrorLogger(fmt.Errorf("failed to download new binary: %w", err)) - return - } - - err = os.Chmod(destPath, 0755) - if err != nil { - ErrorLogger(fmt.Errorf("failed to set executable permission: %w", err)) - return - } - - err = os.WriteFile(versionFile, []byte(strings.TrimSpace(data.TagName)), 0644) - if err != nil { - ErrorLogger(fmt.Errorf("failed to update version file: %w", err)) - return - } - - fmt.Println("successful upgrade to version ", strings.TrimSpace(data.TagName)) + // ps1 || bash + if runtime.GOOS == "w" } From 865a590244cad1144faafbc51b582970ecffe7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:30:19 +0500 Subject: [PATCH 04/14] added variables: script, cmd, script, cmd, err --- update.go | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/update.go b/update.go index 1c87c15..dcb9d19 100644 --- a/update.go +++ b/update.go @@ -4,6 +4,7 @@ import ( "fmt" "net/http" "os" + "os/exec" "path/filepath" "runtime" "strings" @@ -47,5 +48,26 @@ func AutoCommitUpdate() { fmt.Printf("updating to version %s...\n", strings.TrimSpace(data.TagName)) // ps1 || bash - if runtime.GOOS == "w" + if runtime.GOOS == "windows" { + script := fmt.Sprintf("%s/scripts/update-windows-auto-commit.ps1", root) + cmd := exec.Command("powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", script) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + + if err := cmd.Run(); err != nil { + ErrorLogger(fmt.Errorf("failed to run update script: %w", err)) + return + } + + return + } + + script := fmt.Sprintf("%s/scripts/update-linux-auto-commit.sh", root) + cmd := exec.Command("bash", script) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + err := cmd.Run() + if err != nil { + return fmt.Errorf("failed to run bash script: %w", err) + } } From 6fa2eed1454aaefaf16ed32204e6d7d941e0ef83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:31:27 +0500 Subject: [PATCH 05/14] the 'update-linux-auto-commit.sh' file has been changed --- scripts/update-linux-auto-commit.sh | 4 ++++ update.go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/update-linux-auto-commit.sh b/scripts/update-linux-auto-commit.sh index e69de29..94ef7de 100644 --- a/scripts/update-linux-auto-commit.sh +++ b/scripts/update-linux-auto-commit.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +set -e + diff --git a/update.go b/update.go index dcb9d19..bde67c2 100644 --- a/update.go +++ b/update.go @@ -66,8 +66,8 @@ func AutoCommitUpdate() { cmd := exec.Command("bash", script) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr - err := cmd.Run() - if err != nil { - return fmt.Errorf("failed to run bash script: %w", err) + if err := cmd.Run(); err != nil { + ErrorLogger(fmt.Errorf("failed to run bash script: %w", err)) + return } } From b60cb37a97d05e5683ee0ddf3df0a5c380e851ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:31:43 +0500 Subject: [PATCH 06/14] the 'update-linux-auto-commit.sh' file has been changed --- scripts/update-linux-auto-commit.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/update-linux-auto-commit.sh b/scripts/update-linux-auto-commit.sh index 94ef7de..2e9d7cf 100644 --- a/scripts/update-linux-auto-commit.sh +++ b/scripts/update-linux-auto-commit.sh @@ -2,3 +2,16 @@ set -e +GIT_ROOT=$(git rev-parse --show-toplevel) +cd "$GIT_ROOT" + +HOOKS_DIR=".git/hooks" +HOOK_NAME="auto-commit" +HOOK_PATH="$HOOKS_DIR/$HOOK_NAME" +VERSION_FILE="$HOOKS_DIR/auto-commit.version.txt" + +if pgrep -f "$HOOK_PATH" > /dev/null; then + echo "Stopping running auto-commit processes..." + pkill -f "$HOOK_PATH" + sleep 2 +fi From e32912aaa35e1a42e085425c4ab0e8bc606b3ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:31:59 +0500 Subject: [PATCH 07/14] the 'update-linux-auto-commit.sh' file has been changed --- scripts/update-linux-auto-commit.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/update-linux-auto-commit.sh b/scripts/update-linux-auto-commit.sh index 2e9d7cf..921384e 100644 --- a/scripts/update-linux-auto-commit.sh +++ b/scripts/update-linux-auto-commit.sh @@ -11,7 +11,10 @@ HOOK_PATH="$HOOKS_DIR/$HOOK_NAME" VERSION_FILE="$HOOKS_DIR/auto-commit.version.txt" if pgrep -f "$HOOK_PATH" > /dev/null; then - echo "Stopping running auto-commit processes..." pkill -f "$HOOK_PATH" sleep 2 fi + +VERSION_URL="https://api.github.com/repos/thefuture-industries/git-auto-commit/releases/latest" +TAG=$(curl -s "$VERSION_URL" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') +URL="https://github.com/thefuture-industries/git-auto-commit/releases/download/$TAG/auto-commit" From e05cf79bd6bf638aa5540e0c0008aa7691191ba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:32:15 +0500 Subject: [PATCH 08/14] the 'update-linux-auto-commit.sh' file has been changed --- scripts/update-linux-auto-commit.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/update-linux-auto-commit.sh b/scripts/update-linux-auto-commit.sh index 921384e..445322d 100644 --- a/scripts/update-linux-auto-commit.sh +++ b/scripts/update-linux-auto-commit.sh @@ -18,3 +18,11 @@ fi VERSION_URL="https://api.github.com/repos/thefuture-industries/git-auto-commit/releases/latest" TAG=$(curl -s "$VERSION_URL" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') URL="https://github.com/thefuture-industries/git-auto-commit/releases/download/$TAG/auto-commit" + +if [ -f "$VERSION_FILE" ]; then + CURRENT_TAG=$(cat "$VERSION_FILE" | tr -d ' \n\r') + if [ "$CURRENT_TAG" = "$TAG" ]; then + echo -e "\e[33m[!] you have the latest version installed $TAG\e[0m" + exit 0 + fi +fi From 82b20aa8e541b72b129bdf93da3fdb93916bd66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:32:40 +0500 Subject: [PATCH 09/14] the 'update-linux-auto-commit.sh' file has been changed --- scripts/update-linux-auto-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-auto-commit.sh b/scripts/update-linux-auto-commit.sh index 445322d..e2dadb1 100644 --- a/scripts/update-linux-auto-commit.sh +++ b/scripts/update-linux-auto-commit.sh @@ -22,7 +22,7 @@ URL="https://github.com/thefuture-industries/git-auto-commit/releases/download/$ if [ -f "$VERSION_FILE" ]; then CURRENT_TAG=$(cat "$VERSION_FILE" | tr -d ' \n\r') if [ "$CURRENT_TAG" = "$TAG" ]; then - echo -e "\e[33m[!] you have the latest version installed $TAG\e[0m" + echo -e "\033[33m[!] you have the latest version installed $TAG\e[0m" exit 0 fi fi From c4a3eff503f8fa6aed01e176ab3171bfb8a80cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:32:56 +0500 Subject: [PATCH 10/14] the 'update-linux-auto-commit.sh' file has been changed --- scripts/update-linux-auto-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-auto-commit.sh b/scripts/update-linux-auto-commit.sh index e2dadb1..38e35a1 100644 --- a/scripts/update-linux-auto-commit.sh +++ b/scripts/update-linux-auto-commit.sh @@ -22,7 +22,7 @@ URL="https://github.com/thefuture-industries/git-auto-commit/releases/download/$ if [ -f "$VERSION_FILE" ]; then CURRENT_TAG=$(cat "$VERSION_FILE" | tr -d ' \n\r') if [ "$CURRENT_TAG" = "$TAG" ]; then - echo -e "\033[33m[!] you have the latest version installed $TAG\e[0m" + echo -e "\033[33m[!] you have the latest version installed $TAG\033[0m" exit 0 fi fi From 685feb4c8a0406d543c9f73a21db1490ff07ade5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:33:12 +0500 Subject: [PATCH 11/14] the 'update-linux-auto-commit.sh' file has been changed --- scripts/update-linux-auto-commit.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/scripts/update-linux-auto-commit.sh b/scripts/update-linux-auto-commit.sh index 38e35a1..30462a1 100644 --- a/scripts/update-linux-auto-commit.sh +++ b/scripts/update-linux-auto-commit.sh @@ -26,3 +26,32 @@ if [ -f "$VERSION_FILE" ]; then exit 0 fi fi + +download_with_progress() { + local url="$1" + local output="$2" + local bar_width=60 + + content_length=$(curl -sI "$url" | grep -i Content-Length | awk '{print $2}' | tr -d '\r') + [ -z "$content_length" ] && content_length=0 + + echo -n "auto-commit update [" + for ((i=0; i Date: Tue, 13 May 2025 20:33:28 +0500 Subject: [PATCH 12/14] the 'update-linux-auto-commit.sh' file has been changed --- scripts/update-linux-auto-commit.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/update-linux-auto-commit.sh b/scripts/update-linux-auto-commit.sh index 30462a1..83dc5a6 100644 --- a/scripts/update-linux-auto-commit.sh +++ b/scripts/update-linux-auto-commit.sh @@ -55,3 +55,11 @@ download_with_progress() { END { print "" } ' } + +download_with_progress "$URL" "$HOOK_PATH" +chmod +x "$HOOK_PATH" + +echo "$TAG" > "$VERSION_FILE" + +git config --local alias.auto '!./.git/hooks/auto-commit' +echo "successful upgrade to version $TAG" From 6e7d62979749aa76890c0012b7085298e64e48ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:53:05 +0500 Subject: [PATCH 13/14] the 'update-windows-auto-commit.ps1' file has been changed | added variables: script, cmd --- scripts/update-windows-auto-commit.ps1 | 4 +++- update.go | 21 ++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/scripts/update-windows-auto-commit.ps1 b/scripts/update-windows-auto-commit.ps1 index 2abdfd5..b063bfb 100644 --- a/scripts/update-windows-auto-commit.ps1 +++ b/scripts/update-windows-auto-commit.ps1 @@ -43,7 +43,7 @@ function Download-WithProgress { $buffer = New-Object byte[] 8192 $read = 0 $downloaded = 0 - $barWidth = 60 + $barWidth = 50 while (($read = $stream.Read($buffer, 0, $buffer.Length)) -gt 0) { $outStream.Write($buffer, 0, $read) @@ -65,4 +65,6 @@ Download-WithProgress -url $Url -output $hookPath Set-Content -Path $versionFile -Value $tag git config --local alias.auto '!./.git/hooks/auto-commit' + Write-Host "successful upgrade to version $tag" +exit 0 diff --git a/update.go b/update.go index bde67c2..3a13200 100644 --- a/update.go +++ b/update.go @@ -8,6 +8,7 @@ import ( "path/filepath" "runtime" "strings" + "time" ) func AutoCommitUpdate() { @@ -58,16 +59,14 @@ func AutoCommitUpdate() { ErrorLogger(fmt.Errorf("failed to run update script: %w", err)) return } - - return - } - - script := fmt.Sprintf("%s/scripts/update-linux-auto-commit.sh", root) - cmd := exec.Command("bash", script) - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - ErrorLogger(fmt.Errorf("failed to run bash script: %w", err)) - return + } else { + script := fmt.Sprintf("%s/scripts/update-linux-auto-commit.sh", root) + cmd := exec.Command("bash", script) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + ErrorLogger(fmt.Errorf("failed to run bash script: %w", err)) + return + } } } From 1c34eaf7f9f441c3038af597e74b8ccf163fc9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 13 May 2025 20:55:22 +0500 Subject: [PATCH 14/14] the 'release.yml' file has been changed --- .github/workflows/release.yml | 2 ++ update.go | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6e90e7..a2aa71f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -207,6 +207,8 @@ jobs: ./bin/auto-commit ./scripts/install-linux-auto-commit.sh ./scripts/install-windows-auto-commit.ps1 + ./scripts/update-windows-auto-commit.ps1 + ./scripts/update-linux-auto-commit.sh - name: Create new branch for next version run: | diff --git a/update.go b/update.go index 3a13200..06e7c50 100644 --- a/update.go +++ b/update.go @@ -8,7 +8,6 @@ import ( "path/filepath" "runtime" "strings" - "time" ) func AutoCommitUpdate() {