From d2ae207140e55d9bc650240fa13116dd70c41fd7 Mon Sep 17 00:00:00 2001 From: John Allen Date: Thu, 20 Apr 2023 17:17:47 -0400 Subject: [PATCH] +csvdiff --- .../github.com/aswinkarthik/csvdiff/file1.csv | 2 ++ .../github.com/aswinkarthik/csvdiff/file2.csv | 2 ++ .../aswinkarthik/csvdiff/package.yml | 27 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 projects/github.com/aswinkarthik/csvdiff/file1.csv create mode 100644 projects/github.com/aswinkarthik/csvdiff/file2.csv create mode 100644 projects/github.com/aswinkarthik/csvdiff/package.yml diff --git a/projects/github.com/aswinkarthik/csvdiff/file1.csv b/projects/github.com/aswinkarthik/csvdiff/file1.csv new file mode 100644 index 00000000..c1df62bb --- /dev/null +++ b/projects/github.com/aswinkarthik/csvdiff/file1.csv @@ -0,0 +1,2 @@ +tool,description +tea.xyz,is great diff --git a/projects/github.com/aswinkarthik/csvdiff/file2.csv b/projects/github.com/aswinkarthik/csvdiff/file2.csv new file mode 100644 index 00000000..a5a190ab --- /dev/null +++ b/projects/github.com/aswinkarthik/csvdiff/file2.csv @@ -0,0 +1,2 @@ +tool,description +tea.xyz,is the greatest diff --git a/projects/github.com/aswinkarthik/csvdiff/package.yml b/projects/github.com/aswinkarthik/csvdiff/package.yml new file mode 100644 index 00000000..30c8ee00 --- /dev/null +++ b/projects/github.com/aswinkarthik/csvdiff/package.yml @@ -0,0 +1,27 @@ +distributable: + url: https://github.com/aswinkarthik/csvdiff/archive/refs/tags/v{{version}}.tar.gz + strip-components: 1 + +versions: + github: aswinkarthik/csvdiff # reads github tags but only tags of releases (this is usually what you want) + +build: + dependencies: + go.dev: "*" + env: + LDFLAGS: + - -s + - -w + - -X main.version={{version}} + script: | + go build -ldflags "$LDFLAGS" -o csvdiff main.go + mkdir -p "{{ prefix }}"/bin + mv csvdiff "{{ prefix }}"/bin + +provides: + - bin/csvdiff + +test: + fixture: tea.xyz,is the greatest,MODIFIED + script: | + test "$(csvdiff file1.csv file2.csv --format rowmark)" = "$(cat $FIXTURE)"