-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (48 loc) · 2.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
BINARY_NAME=pastenym
BINARY_FOLDER=bin
all: build
build:
go build -o ./bin/${BINARY_NAME} *.go
compile:
echo "Compiling for every OS and Platform"
mkdir -p ${BINARY_FOLDER}
GOOS=windows GOARCH=amd64 go build -o ${BINARY_FOLDER}/${BINARY_NAME}-amd64-windows.exe *.go
GOOS=windows GOARCH=386 go build -o ${BINARY_FOLDER}/${BINARY_NAME}-386-windows.exe *.go
GOOS=freebsd GOARCH=386 go build -o ${BINARY_FOLDER}/${BINARY_NAME}-386-freebsd *.go
GOOS=linux GOARCH=386 go build -o ${BINARY_FOLDER}/${BINARY_NAME}-386-linux *.go
GOOS=linux GOARCH=amd64 go build -o ${BINARY_FOLDER}/${BINARY_NAME}-amd64-linux *.go
GOOS=linux GOARCH=arm go build -o ${BINARY_FOLDER}/${BINARY_NAME}-arm-linux *.go
GOOS=linux GOARCH=arm64 go build -o ${BINARY_FOLDER}/${BINARY_NAME}-arm64-linux *.go
GOOS=darwin GOARCH=amd64 go build -o ${BINARY_FOLDER}/${BINARY_NAME}-amd64-darwin *.go
run:
mkdir -p ${BINARY_FOLDER}
go build -o ${BINARY_FOLDER}/${BINARY_NAME} *.go
./bin/${BINARY_NAME}
test: build
echo "Test before release"
echo "Add a paste"
./${BINARY_FOLDER}/${BINARY_NAME} -text "Add a paste"
echo "Add a public paste"
./${BINARY_FOLDER}/${BINARY_NAME} -text "Add a public paste" -public
echo "Add a ipfs paste"
./${BINARY_FOLDER}/${BINARY_NAME} -text "Add a ipfs paste" -ipfs
echo "Add burn after reading paste"
./${BINARY_FOLDER}/${BINARY_NAME} -text "Add burn after reading paste" -burn
sleep 3
echo "Get a paste id key"
./${BINARY_FOLDER}/${BINARY_NAME} -id 5c3g1-uJ -key 6x23zeietv45ho9jlx7o4in1045qh2c3
sleep 3
echo "Get a paste URL"
./${BINARY_FOLDER}/${BINARY_NAME} -id "https://pastenym.ch/#/5c3g1-uJ&key=6x23zeietv45ho9jlx7o4in1045qh2c3"
sleep 3
echo "Get a public paste"
./${BINARY_FOLDER}/${BINARY_NAME} -id NL_4bnBT
sleep 3
echo "Get a paste from IPFS"
./${BINARY_FOLDER}/${BINARY_NAME} -id "https://pastenym.ch/#/SPeNlLtY&key=l72u6pj1y2hf26oz1fok9qx4rjdjo7wj"
sleep 3
echo "Get a paste with file"
./${BINARY_FOLDER}/${BINARY_NAME} -id "https://pastenym.ch/#/VQxVQl2d&key=922fc0f59aeb4ae7493e68bd0a252c12"
clean:
go clean
rm ${BINARY_FOLDER}/*