Skip to content

Commit

Permalink
Add install script for setting up csvdiff. Fixes aswinkarthik#16
Browse files Browse the repository at this point in the history
  • Loading branch information
kishaningithub committed Oct 26, 2018
1 parent 83dd3da commit ba692f3
Show file tree
Hide file tree
Showing 4 changed files with 400 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

.idea/*

out/

# End of https://www.gitignore.io/api/go
Expand Down
7 changes: 7 additions & 0 deletions goreleaser.yml → .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
project_name: csvdiff

release:
github:
owner: aswinkarthik
name: csvdiff

builds:
- main: ./main.go
binary: csvdiff
Expand Down
32 changes: 10 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,28 @@ $ csvdiff base.csv delta.csv

## Installation

- For MacOS
### Using binaries

```bash
curl -sL https://github.com/aswinkarthik93/csvdiff/releases/download/v1.0.0/csvdiff_1.0.0_darwin_amd64.tar.gz | tar xfz -
```

- For centos

```bash
yum install https://github.com/aswinkarthik93/csvdiff/releases/download/v1.0.0/csvdiff_1.0.0_linux_64-bit.rpm
```

- For debian
Replace `vX.Y.Z` with the latest version in [releases page](https://github.com/aswinkarthik/csvdiff/releases)

```bash
curl -sL https://github.com/aswinkarthik93/csvdiff/releases/download/v1.0.0/csvdiff_1.0.0_linux_64-bit.deb -O
dpkg --install csvdiff_*_linux_64-bit.deb
```
# binary will be $GOPATH/bin/csvdiff
curl -sfL https://raw.githubusercontent.com/aswinkarthik93/csvdiff/master/install.sh| sh -s -- -b $GOPATH/bin vX.Y.Z

- For Linux
# or install it into ./bin/
curl -sfL https://raw.githubusercontent.com/aswinkarthik93/csvdiff/master/install.sh| sh -s vX.Y.Z

```bash
curl -sL https://github.com/aswinkarthik93/csvdiff/releases/download/v1.0.0/csvdiff_1.0.0_linux_amd64.tar.gz | tar xfz -
# In alpine linux (as it does not come with curl by default)
wget -O - -q https://raw.githubusercontent.com/aswinkarthik93/csvdiff/master/install.sh| sh -s vX.Y.Z
```

- For [Windows](https://github.com/aswinkarthik93/csvdiff/releases/download/v1.0.0/csvdiff_1.0.0_windows_amd64.tar.gz)

- Build using Go
### Using source code

```bash
go get -u github.com/aswinkarthik93/csvdiff
```

## Usecase
## Use case

- Cases where you have a base database dump as csv. If you receive the changes as another database dump as csv, this tool can be used to figure out what are the additions and modifications to the original database dump. The `additions.csv` can be used to create an `insert.sql` and with the `modifications.csv` an `update.sql` data migration.
- The delta file can either contain just the changes or the entire table dump along with the changes.
Expand Down
Loading

0 comments on commit ba692f3

Please sign in to comment.