Jaypore CI

> Jaypore CI: Minimal, Offline, Local CI system.
Log | Files | Refs | README | LICENSE

commit 2f3b9b6a67d7122e8f53b5fff6510661b5651c6e
parent cf25d7bc6cc1d729447ca653e8032b6688c02b39
Author: Arjoonn Sharma <arjoonn@midpathsoftware.com>
Date:   Sat, 28 Feb 2026 12:47:34 +0530

x

Diffstat:
Mcmd/git-jci/main.go | 2+-
Mgo.mod | 4++--
Minternal/jci/cron.go | 5+++++
Minternal/jci/cron_parser.go | 9---------
Minternal/jci/cron_types.go | 7-------
5 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/cmd/git-jci/main.go b/cmd/git-jci/main.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/theSage21/jaypore_ci" + "github.com/theSage21/jaypore_ci/internal/jci" ) // version is set at build time via -ldflags "-X main.version=<version>". diff --git a/go.mod b/go.mod @@ -1,3 +1,3 @@ -module https://github.com/theSage21/jaypore_ci +module github.com/theSage21/jaypore_ci -go 1.22.2 +go 1.22 diff --git a/internal/jci/cron.go b/internal/jci/cron.go @@ -15,10 +15,15 @@ import ( const cronMarkerPrefix = "# JCI:" // CronEntry represents a parsed crontab entry +// Additional metadata (line number, command, raw text) is populated when +// entries are loaded via the cron parser utilities. type CronEntry struct { Schedule string // e.g., "0 * * * *" Name string // optional name/comment Branch string // branch to run on (default: current) + Line int // source line number (optional) + Command string // parsed command (optional) + Raw string // raw line text (optional) } // Cron handles cron subcommands diff --git a/internal/jci/cron_parser.go b/internal/jci/cron_parser.go @@ -10,15 +10,6 @@ import ( "strings" ) -// CronEntry represents a single line from .jci/crontab -// It contains the parsed schedule as well as the command portion. -type CronEntry struct { - Line int - Schedule string - Command string - Raw string -} - // LoadCronEntries opens .jci/crontab (if it exists) and parses all entries. func LoadCronEntries(repoRoot string) ([]CronEntry, error) { cronPath := filepath.Join(repoRoot, ".jci", "crontab") diff --git a/internal/jci/cron_types.go b/internal/jci/cron_types.go @@ -76,13 +76,6 @@ func (job CronJob) shellCommand(repoRoot string) string { return full } -func shellEscape(value string) string { - if value == "" { - return "''" - } - return "'" + strings.ReplaceAll(value, "'", "'\\''") + "'" -} - func splitCommandHeadTail(cmd string) (string, string) { parts := strings.Fields(cmd) if len(parts) == 0 {