Skip to content

Commit 9f6428c

Browse files
committed
Improving release process
1 parent 158723a commit 9f6428c

File tree

11 files changed

+177
-99
lines changed

11 files changed

+177
-99
lines changed

INSTALL.md

Lines changed: 105 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,142 @@
11

22
# Installation
33

4+
*datatools* is a collection of command line programs run from a shell like Bash.
5+
46
## Compiled version
57

6-
*datatools* is a collection of command line programs run from a shell like Bash (or Powershell in Windows). If you download the repository a compiled version is in the dist directory. The compiled VERSION_NO matching your computer type and operating system can be copied to a bin directory in your PATH.
8+
This is generalized instructions for a release.
9+
10+
Compiled versions are available for Mac OS X (amd64 processor, macosx-amd64), Linux (amd64 process, linux-amd64),
11+
Windows (amd64 processor, windows-amd64) and Rapsberry Pi (arm7 processor, raspbian-arm7)
12+
13+
VERSION_NUMBER is a [symantic version number](http://semver.org/) (e.g. v0.1.2)
14+
15+
16+
For all the released version go to the project page on Github and click latest release
17+
18+
> https://github.com/caltechlibrary/datatools/releases/latest
19+
20+
21+
| Platform | Zip Filename | Folder for executables |
22+
|-------------|------------------------------------------|------------------------|
23+
| Windows | datatools-VERSION_NUMBER-windows-amd64.zip | windows_amd64 |
24+
| Mac OS X | datatools-VERSION_NUMBER-macosx-amd64.zip | macosx_amd64 |
25+
| Linux/Intel | datatools-VERSION_NUMBER-linux-amd64.zip | linux_amd64 |
26+
| Raspbery Pi | datatools-VERSION_NUMBER-raspbian-arm7.zip | raspbian_arm7 |
27+
28+
## The basic recipe
29+
30+
+ Find the Zip file listed matching the architecture you're running and download it
31+
+ (e.g. if you're on a Windows 10 laptop/Surface with a amd64 style CPU you'd choose the Zip file with "windows-amd64" in the name).
32+
+ Download the zip file and unzip the file.
33+
+ Copy the contents of the folder named "bin" to a folder that is in your path
34+
+ (e.g. "$HOME/bin" is common).
35+
+ Adjust your PATH if needed
36+
+ (e.g. `export PATH="$HOME/bin:$PATH"`)
37+
+ Test
738

8-
Compiled versions are available for Mac OS X (amd64 processor), Linux (amd64), Windows (amd64) and Rapsberry Pi (both ARM6 and ARM7)
939

1040
### Mac OS X
1141

12-
1. Download **datatools-VERSION_NO-release.zip** from [https://github.com/caltechlibrary/datatools/releases/latest](https://github.com/caltechlibrary/datatools/releases/latest)
13-
2. Open a finder window, find and unzip **datatools-VERSION_NO-release.zip**
14-
3. Look in the unziped folder and find *dist/macosx-amd64/*
15-
4. Drag (or copy) *jsoncols*, *jsonrange*, etc. to a "bin" directory in your path
16-
5. Open and "Terminal" and run `jsoncols -h` to confirm you were successful
42+
1. Download the zip file
43+
2. Unzip the zip file
44+
3. Copy the executables to $HOME/bin (or a folder in your path)
45+
4. Make sure the new location in in our path
46+
5. Test
47+
48+
Here's an example of the commands run in the Terminal App after downloading the
49+
zip file.
50+
51+
```shell
52+
cd Downloads/
53+
unzip datatools-*-macosx-amd64.zip
54+
mkdir -p $HOME/bin
55+
cp -v bin/* $HOME/bin/
56+
export PATH=$HOME/bin:$PATH
57+
csvfind -version
58+
```
1759

1860
### Windows
1961

20-
1. Download **datatools-VERSION_NO-release.zip** from [https://github.com/caltechlibrary/datatools/releases/latest](https://github.com/caltechlibrary/datatools/releases/latest)
21-
2. Open the file manager find and unzip **datatools-VERSION_NO-release.zip**
22-
3. Look in the unziped folder and find *dist/windows-amd64/*
23-
4. Drag (or copy) *jsoncols.exe*, *jsonrange.exe*, etc. to a "bin" directory in your path
24-
5. Open Bash and and run `jsoncols -h` to confirm you were successful
62+
1. Download the zip file
63+
2. Unzip the zip file
64+
3. Copy the executables to $HOME/bin (or a folder in your path)
65+
4. Test
66+
67+
Here's an example of the commands run in from the Bash shell on Windows 10 after
68+
downloading the zip file.
69+
70+
```shell
71+
cd Downloads/
72+
unzip datatools-*-windows-amd64.zip
73+
mkdir -p $HOME/bin
74+
cp -v bin/* $HOME/bin/
75+
export PATH=$HOME/bin:$PATH
76+
csvfind -version
77+
```
2578

26-
### Linux
2779

28-
1. Download **datatools-VERSION_NO-release.zip** from [https://github.com/caltechlibrary/datatools/releases/latest](https://github.com/caltechlibrary/datatools/releases/latest)
29-
2. Find and unzip **datatools-VERSION_NO-release.zip**
30-
3. In the unziped directory and find for *dist/linux-amd64/*
31-
4. Copy *jsoncols*, *jsonrange*, etc. to a "bin" directory (e.g. cp ~/Downloads/datatools-VERSION_NO-release/dist/linux-amd64/\* ~/bin/)
32-
5. From the shell prompt run `jsoncols -h` to confirm you were successful
80+
### Linux
3381

34-
### Raspberry Pi
82+
1. Download the zip file
83+
2. Unzip the zip file
84+
3. Copy the executables to $HOME/bin (or a folder in your path)
85+
4. Test
3586

36-
If you are using a Raspberry Pi 2 or later use the ARM7 VERSION_NO, ARM6 is only for the first generaiton Raspberry Pi.
87+
Here's an example of the commands run in from the Bash shell after
88+
downloading the zip file.
3789

38-
1. Download **datatools-VERSION_NO-release.zip** from [https://github.com/caltechlibrary/datatools/releases/latest](https://github.com/caltechlibrary/datatools/releases/latest)
39-
2. Find and unzip **datatools-VERSION_NO-release.zip**
40-
3. In the unziped directory and find for *dist/raspberrypi-arm7/*
41-
4. Copy *jsoncols*, *jsonrange*, etc. to a "bin" directory (e.g. cp ~/Downloads/datatools-VERSION_NO-release/dist/raspberrypi-arm7/\* ~/bin/)
42-
+ if you are using an original Raspberry Pi you should copy the ARM6 version instead
43-
5. From the shell prompt run `jsoncols -h` to confirm you were successful
90+
```shell
91+
cd Downloads/
92+
unzip datatools-*-linux-amd64.zip
93+
mkdir -p $HOME/bin
94+
cp -v bin/* $HOME/bin/
95+
export PATH=$HOME/bin:$PATH
96+
csvfind -version
97+
```
4498

4599

46-
## Compiling from source
100+
### Raspberry Pi
47101

48-
If you have go v1.7.4 or better installed then should be able to "go get" to install all the **datatools** utilities and
102+
Released version is for a Raspberry Pi 2 or later use (i.e. requires ARM 7 support).
49103

104+
1. Download the zip file
105+
2. Unzip the zip file
106+
3. Copy the executables to $HOME/bin (or a folder in your path)
107+
4. Test
108+
109+
Here's an example of the commands run in from the Bash shell after
110+
downloading the zip file.
111+
112+
```shell
113+
cd Downloads/
114+
unzip datatools-*-raspbian-arm7.zip
115+
mkdir -p $HOME/bin
116+
cp -v bin/* $HOME/bin/
117+
export PATH=$HOME/bin:$PATH
118+
csvfind -version
50119
```
51-
go get -u github.com/caltechlibrary/datatools/...
52-
```
53120

54-
Or for Windows 10 Powershell (assumes the Windows versions of Go and Git are previously installed)
55121

122+
## Compiling from source
123+
124+
_datatools_ is "go gettable". Use the "go get" command to download the dependant packages
125+
as well as _datatools_'s source code.
56126

57-
```powershell
58-
$Env:GOPATH = "$HOME"
127+
```shell
59128
go get -u github.com/caltechlibrary/datatools/...
60129
```
61130

62-
or to install from source on Linux/Unix systems
131+
Or clone the repstory and then compile
63132

64-
```bash
133+
```shell
134+
cd
65135
git clone https://github.com/caltechlibrary/datatools src/github.com/caltechlibrary/datatools
66136
cd src/github.com/caltechlibrary/datatools
67137
make
68138
make test
69139
make install
70140
```
71141

72-
Or for Windows 10 Powershell
73-
74-
```powershell
75-
$Env:GOBIN = "$HOME\bin"
76-
git clone https://github.com/caltechlibrary/datatools src/github.com/caltechlibrary/datatools
77-
cd src\github.com\caltechlibrary\datatools
78-
go install cmds\jsoncols\filefile.go
79-
```
80142

Makefile

Lines changed: 72 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ publish:
6565
clean:
6666
if [ -d bin ]; then /bin/rm -fR bin; fi
6767
if [ -d dist ]; then /bin/rm -fR dist; fi
68-
if [ -f $(PROJECT)-$(VERSION)-release.zip ]; then rm -f $(PROJECT)-$(VERSION)-release.zip; fi
6968

7069
install:
7170
env GOBIN=$(HOME)/bin go install cmds/csvcols/csvcols.go
@@ -80,68 +79,85 @@ install:
8079
env GOBIN=$(HOME)/bin go install cmds/csv2json/csv2json.go
8180

8281
dist/linux-amd64:
83-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/csvcols cmds/csvcols/csvcols.go
84-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/csvfind cmds/csvfind/csvfind.go
85-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/csvjoin cmds/csvjoin/csvjoin.go
86-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/jsoncols cmds/jsoncols/jsoncols.go
87-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/jsonrange cmds/jsonrange/jsonrange.go
88-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/xlsx2json cmds/xlsx2json/xlsx2json.go
89-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/xlsx2csv cmds/xlsx2csv/xlsx2csv.go
90-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/csv2mdtable cmds/csv2mdtable/csv2mdtable.go
91-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/csv2xlsx cmds/csv2xlsx/csv2xlsx.go
92-
env GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/csv2json cmds/csv2json/csv2json.go
82+
mkdir -p dist/bin
83+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/csvcols cmds/csvcols/csvcols.go
84+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/csvfind cmds/csvfind/csvfind.go
85+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/csvjoin cmds/csvjoin/csvjoin.go
86+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/jsoncols cmds/jsoncols/jsoncols.go
87+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/jsonrange cmds/jsonrange/jsonrange.go
88+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/xlsx2json cmds/xlsx2json/xlsx2json.go
89+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/xlsx2csv cmds/xlsx2csv/xlsx2csv.go
90+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/csv2mdtable cmds/csv2mdtable/csv2mdtable.go
91+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/csv2xlsx cmds/csv2xlsx/csv2xlsx.go
92+
env GOOS=linux GOARCH=amd64 go build -o dist/bin/csv2json cmds/csv2json/csv2json.go
93+
cd dist && zip -r $(PROJECT)-$(VERSION)-linux-amd64.zip README.md LICENSE INSTALL.md bin/* docs/* how-to/* demos/*
94+
rm -fR dist/bin
9395

9496
dist/macosx-amd64:
95-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/csvcols cmds/csvcols/csvcols.go
96-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/csvfind cmds/csvfind/csvfind.go
97-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/csvjoin cmds/csvjoin/csvjoin.go
98-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/jsoncols cmds/jsoncols/jsoncols.go
99-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/jsonrange cmds/jsonrange/jsonrange.go
100-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/xlsx2json cmds/xlsx2json/xlsx2json.go
101-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/xlsx2csv cmds/xlsx2csv/xlsx2csv.go
102-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/csv2mdtable cmds/csv2mdtable/csv2mdtable.go
103-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/csv2xlsx cmds/csv2xlsx/csv2xlsx.go
104-
env GOOS=darwin GOARCH=amd64 go build -o dist/macosx-amd64/csv2json cmds/csv2json/csv2json.go
97+
mkdir -p dist/bin
98+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/csvcols cmds/csvcols/csvcols.go
99+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/csvfind cmds/csvfind/csvfind.go
100+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/csvjoin cmds/csvjoin/csvjoin.go
101+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/jsoncols cmds/jsoncols/jsoncols.go
102+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/jsonrange cmds/jsonrange/jsonrange.go
103+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/xlsx2json cmds/xlsx2json/xlsx2json.go
104+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/xlsx2csv cmds/xlsx2csv/xlsx2csv.go
105+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/csv2mdtable cmds/csv2mdtable/csv2mdtable.go
106+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/csv2xlsx cmds/csv2xlsx/csv2xlsx.go
107+
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/csv2json cmds/csv2json/csv2json.go
108+
cd dist && zip -r $(PROJECT)-$(VERSION)-macosx-amd64.zip README.md LICENSE INSTALL.md bin/* docs/* how-to/* demos/*
109+
rm -fR dist/bin
105110

106111
dist/windows-amd64:
107-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/csvcols.exe cmds/csvcols/csvcols.go
108-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/csvfind.exe cmds/csvfind/csvfind.go
109-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/csvjoin.exe cmds/csvjoin/csvjoin.go
110-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/jsoncols.exe cmds/jsoncols/jsoncols.go
111-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/jsonrange.exe cmds/jsonrange/jsonrange.go
112-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/xlsx2json.exe cmds/xlsx2json/xlsx2json.go
113-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/xlsx2csv.exe cmds/xlsx2csv/xlsx2csv.go
114-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/csv2mdtable.exe cmds/csv2mdtable/csv2mdtable.go
115-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/csv2xlsx.exe cmds/csv2xlsx/csv2xlsx.go
116-
env GOOS=windows GOARCH=amd64 go build -o dist/windows-amd64/csv2json.exe cmds/csv2json/csv2json.go
112+
mkdir -p dist/bin
113+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/csvcols.exe cmds/csvcols/csvcols.go
114+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/csvfind.exe cmds/csvfind/csvfind.go
115+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/csvjoin.exe cmds/csvjoin/csvjoin.go
116+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/jsoncols.exe cmds/jsoncols/jsoncols.go
117+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/jsonrange.exe cmds/jsonrange/jsonrange.go
118+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/xlsx2json.exe cmds/xlsx2json/xlsx2json.go
119+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/xlsx2csv.exe cmds/xlsx2csv/xlsx2csv.go
120+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/csv2mdtable.exe cmds/csv2mdtable/csv2mdtable.go
121+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/csv2xlsx.exe cmds/csv2xlsx/csv2xlsx.go
122+
env GOOS=windows GOARCH=amd64 go build -o dist/bin/csv2json.exe cmds/csv2json/csv2json.go
123+
cd dist && zip -r $(PROJECT)-$(VERSION)-windows-amd64.zip README.md LICENSE INSTALL.md bin/* docs/* how-to/* demos/*
124+
rm -fR dist/bin
125+
117126

118127
dist/raspbian-arm7:
119-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/csvcols cmds/csvcols/csvcols.go
120-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/csvfind cmds/csvfind/csvfind.go
121-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/csvjoin cmds/csvjoin/csvjoin.go
122-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/jsoncols cmds/jsoncols/jsoncols.go
123-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/jsonrange cmds/jsonrange/jsonrange.go
124-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/xlsx2json cmds/xlsx2json/xlsx2json.go
125-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/xlsx2csv cmds/xlsx2csv/xlsx2csv.go
126-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/csv2mdtable cmds/csv2mdtable/csv2mdtable.go
127-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/csv2xlsx cmds/csv2xlsx/csv2xlsx.go
128-
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/raspbian-arm7/csv2json cmds/csv2json/csv2json.go
129-
130-
release: dist/linux-amd64 dist/macosx-amd64 dist/windows-amd64 dist/raspbian-arm7
131-
mkdir -p dist
128+
mkdir -p dist/bin
129+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/csvcols cmds/csvcols/csvcols.go
130+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/csvfind cmds/csvfind/csvfind.go
131+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/csvjoin cmds/csvjoin/csvjoin.go
132+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/jsoncols cmds/jsoncols/jsoncols.go
133+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/jsonrange cmds/jsonrange/jsonrange.go
134+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/xlsx2json cmds/xlsx2json/xlsx2json.go
135+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/xlsx2csv cmds/xlsx2csv/xlsx2csv.go
136+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/csv2mdtable cmds/csv2mdtable/csv2mdtable.go
137+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/csv2xlsx cmds/csv2xlsx/csv2xlsx.go
138+
env GOOS=linux GOARCH=arm GOARM=7 go build -o dist/bin/csv2json cmds/csv2json/csv2json.go
139+
cd dist && zip -r $(PROJECT)-$(VERSION)-raspbian-arm7.zip README.md LICENSE INSTALL.md bin/* docs/* how-to/* demos/*
140+
rm -fR dist/bin
141+
142+
distribute_docs:
143+
mkdir -p dist/docs
144+
mkdir -p dist/how-to
132145
cp -v README.md dist/
133146
cp -v LICENSE dist/
134147
cp -v INSTALL.md dist/
135-
cp -v docs/csv2json.md dist/
136-
cp -v docs/csv2mdtable.md dist/
137-
cp -v docs/csv2xlsx.md dist/
138-
cp -v docs/csvcols.md dist/
139-
cp -v docs/csvfind.md dist/
140-
cp -v docs/csvjoin.md dist/
141-
cp -v docs/index.md dist/
142-
cp -v docs/jsoncols.md dist/
143-
cp -v docs/jsonrange.md dist/
144-
cp -v docs/xlsx2csv.md dist/
145-
cp -v docs/xlsx2json.md dist/
146-
zip -r $(PROJECT)-$(VERSION)-release.zip dist/
148+
cp -v docs/csv2json.md dist/docs/
149+
cp -v docs/csv2mdtable.md dist/docs/
150+
cp -v docs/csv2xlsx.md dist/docs/
151+
cp -v docs/csvcols.md dist/docs/
152+
cp -v docs/csvfind.md dist/docs/
153+
cp -v docs/csvjoin.md dist/docs/
154+
cp -v docs/index.md dist/docs/
155+
cp -v docs/jsoncols.md dist/docs/
156+
cp -v docs/jsonrange.md dist/docs/
157+
cp -v docs/xlsx2csv.md dist/docs/
158+
cp -v docs/xlsx2json.md dist/docs/
159+
cp -v how-to/*.md dist/how-to/
160+
cp -vR demos dist/
161+
162+
release: distribute_docs dist/linux-amd64 dist/macosx-amd64 dist/windows-amd64 dist/raspbian-arm7
147163

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)