Skip to content

Commit e833f3d

Browse files
authored
Merge pull request #120 from bots-garden/119-prepare-018
📦 release 0.1.8 in progress
2 parents 4016b87 + e4737fe commit e833f3d

18 files changed

+288
-47
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ What is **Capsule**?
1111

1212
> 🖐 **The functions are developed with GoLang and compiled to wasm with TinyGo**
1313
14-
📦 Before executing or running a function, you need to download the last release of **Capsule**: https://github.com/bots-garden/capsule/releases/tag/0.1.7 (`v0.1.7 🦑[squid]`)
14+
📦 Before executing or running a function, you need to download the last release of **Capsule**: https://github.com/bots-garden/capsule/releases/tag/0.1.8 (`v0.1.8 🐙[octopus]`)
1515

1616
> - **Capsule** is developed with GoLang and thanks to the 💜 **[Wazero](https://github.com/tetratelabs/wazero)** project
1717
> - The wasm modules are developed in GoLang and compiled with TinyGo (with the WASI specification)

capsule-launcher/go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ go 1.18
55
replace github.com/bots-garden/capsule/commons => ../commons
66

77
require (
8-
github.com/bots-garden/capsule/commons v0.0.0-20220830110544-64220191babb
8+
github.com/bots-garden/capsule/commons v0.0.0-20220903062354-1c48dd250b77
99
github.com/couchbase/gocb/v2 v2.5.2
1010
github.com/gin-gonic/gin v1.8.1
1111
github.com/go-redis/redis/v9 v9.0.0-beta.2
1212
github.com/go-resty/resty/v2 v2.7.0
13-
github.com/shirou/gopsutil/v3 v3.22.7
13+
github.com/shirou/gopsutil/v3 v3.22.8
1414
github.com/tetratelabs/wazero v1.0.0-pre.1
1515
)
1616

capsule-launcher/go.sum

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUA
8181
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
8282
github.com/shirou/gopsutil/v3 v3.22.7 h1:flKnuCMfUUrO+oAvwAd6GKZgnPzr098VA/UJ14nhJd4=
8383
github.com/shirou/gopsutil/v3 v3.22.7/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI=
84+
github.com/shirou/gopsutil/v3 v3.22.8 h1:a4s3hXogo5mE2PfdfJIonDbstO/P+9JszdfhAHSzD9Y=
85+
github.com/shirou/gopsutil/v3 v3.22.8/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI=
8486
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
8587
github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
8688
github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
@@ -95,6 +97,7 @@ github.com/tetratelabs/wazero v1.0.0-pre.1 h1:bUZ4vf21c36RmgA3enNOlLgPElEVDYoRJJ
9597
github.com/tetratelabs/wazero v1.0.0-pre.1/go.mod h1:M8UDNECGm/HVjOfq0EOe4QfCY9Les1eq54IChMLETbc=
9698
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
9799
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
100+
github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=
98101
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
99102
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
100103
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=

capsulemodule/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/bots-garden/capsule/capsulemodule
22

33
go 1.18
44

5-
require github.com/bots-garden/capsule/commons v0.0.0-20220821060842-d1dc9f030021
5+
require github.com/bots-garden/capsule/commons v0.0.0-20220903062354-1c48dd250b77

capsulemodule/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
github.com/bots-garden/capsule/commons v0.0.0-20220821060842-d1dc9f030021 h1:cBeILASaSUdrsImLP6wR6a747SHYBJqIwuADm2BMDO4=
22
github.com/bots-garden/capsule/commons v0.0.0-20220821060842-d1dc9f030021/go.mod h1:5ctHSZAwy3GEi4tR9YKFTfWtBUXDcOMFHNiJYXbV61c=
3+
github.com/bots-garden/capsule/commons v0.0.0-20220903062354-1c48dd250b77 h1:CyywCzVyAuT7fHf5iHgjx0IqUvEVevtbVMwbSkS2VnA=
4+
github.com/bots-garden/capsule/commons v0.0.0-20220903062354-1c48dd250b77/go.mod h1:5ctHSZAwy3GEi4tR9YKFTfWtBUXDcOMFHNiJYXbV61c=

capsulemodule/refresh_package.sh

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
#!/bin/bash
2-
rm ./go.sum
3-
rm ./go.mod
4-
5-
echo "module github.com/bots-garden/capsule/capsulemodule" > go.mod
6-
echo "" >> go.mod
7-
echo "go 1.18" >> go.mod
8-
9-
go mod tidy
2+
go get -u ./...
103

114

commons/package.sh

-3
This file was deleted.

commons/refresh_package.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
go get -u ./...
3+
4+

commons/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package commons
22

33
func CapsuleVersion() string {
4-
return "v0.1.7 🦑[squid](dev)"
4+
return "v0.1.8 🐙[octopus]"
55
}

install-all-capsule-elements.sh

+45-19
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,77 @@
11
#!/bin/bash
2-
CAPSULE_VERSION="0.1.7"
32

3+
LAST_CAPSULE_VERSION="0.1.8"
4+
echo "System: ${OSTYPE} $(uname -m)"
45

5-
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
6-
CAPSULE_OS="linux"
7-
elif [[ "$OSTYPE" == "darwin"* ]]; then
8-
CAPSULE_OS="darwin"
9-
else
10-
CAPSULE_OS="linux"
6+
if [[ $1 = "help" ]]
7+
then
8+
echo "usage: $0"
9+
echo "The script will detect the OS & ARCH and use the last version of capsule (${LAST_CAPSULE_VERSION})"
10+
echo "You can force the values by setting these environment variables:"
11+
echo "- CAPSULE_OS (linux, darwin)"
12+
echo "- CAPSULE_ARCH (amd64, arm64)"
13+
echo "- CAPSULE_VERSION"
14+
exit 0
1115
fi
1216

13-
if [[ "$(uname -m)" == "x86_64" ]]; then
14-
CAPSULE_ARCH="amd64"
15-
elif [[ "$OSTYPE" == "arm64" ]]; then
16-
CAPSULE_ARCH="arm64"
17-
else
18-
CAPSULE_ARCH="amd64"
17+
if [ -z "$CAPSULE_VERSION" ]
18+
then
19+
CAPSULE_VERSION=$LAST_CAPSULE_VERSION
1920
fi
2021

21-
CAPSULE_ARCH=$(uname -m)
22+
if [ -z "$CAPSULE_OS" ]
23+
then
24+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
25+
CAPSULE_OS="linux"
26+
elif [[ "$OSTYPE" == "darwin"* ]]; then
27+
CAPSULE_OS="darwin"
28+
else
29+
CAPSULE_OS="linux"
30+
fi
31+
fi
32+
33+
if [ -z "$CAPSULE_ARCH" ]
34+
then
35+
if [[ "$(uname -m)" == "x86_64" ]]; then
36+
CAPSULE_ARCH="amd64"
37+
elif [[ "$(uname -m)" == "arm64" ]]; then
38+
CAPSULE_ARCH="arm64"
39+
elif [[ $(uname -m) == "aarch64" ]]; then
40+
CAPSULE_ARCH="arm64"
41+
else
42+
CAPSULE_ARCH="amd64"
43+
fi
44+
fi
45+
46+
47+
echo "Installing capsule elements [${CAPSULE_VERSION}] ${CAPSULE_OS} ${CAPSULE_ARCH}"
2248

2349
CAPSULE_MODULE="caps"
24-
echo "💊 Installing ${CAPSULE_MODULE}..."
50+
echo "Installing ${CAPSULE_MODULE}..."
2551
wget https://github.com/bots-garden/capsule/releases/download/${CAPSULE_VERSION}/${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
2652
sudo tar -zxf ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz --directory /usr/local/bin
2753
rm ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
2854

2955
CAPSULE_MODULE="capsule"
30-
echo "💊 Installing ${CAPSULE_MODULE}..."
56+
echo "Installing ${CAPSULE_MODULE}..."
3157
wget https://github.com/bots-garden/capsule/releases/download/${CAPSULE_VERSION}/${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
3258
sudo tar -zxf ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz --directory /usr/local/bin
3359
rm ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
3460

3561
CAPSULE_MODULE="capsule-registry"
36-
echo "💊 Installing ${CAPSULE_MODULE}..."
62+
echo "Installing ${CAPSULE_MODULE}..."
3763
wget https://github.com/bots-garden/capsule/releases/download/${CAPSULE_VERSION}/${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
3864
sudo tar -zxf ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz --directory /usr/local/bin
3965
rm ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
4066

4167
CAPSULE_MODULE="capsule-reverse-proxy"
42-
echo "💊 Installing ${CAPSULE_MODULE}..."
68+
echo "Installing ${CAPSULE_MODULE}..."
4369
wget https://github.com/bots-garden/capsule/releases/download/${CAPSULE_VERSION}/${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
4470
sudo tar -zxf ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz --directory /usr/local/bin
4571
rm ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
4672

4773
CAPSULE_MODULE="capsule-worker"
48-
echo "💊 Installing ${CAPSULE_MODULE}..."
74+
echo "Installing ${CAPSULE_MODULE}..."
4975
wget https://github.com/bots-garden/capsule/releases/download/${CAPSULE_VERSION}/${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
5076
sudo tar -zxf ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz --directory /usr/local/bin
5177
rm ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz

install-capsule-ctl.sh

+44-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
#!/bin/bash
2-
CAPSULE_VERSION="0.1.7"
2+
LAST_CAPSULE_VERSION="0.1.8"
3+
echo "System: ${OSTYPE} $(uname -m)"
4+
5+
if [[ $1 = "help" ]]
6+
then
7+
echo "usage: $0"
8+
echo "The script will detect the OS & ARCH and use the last version of capsule (${LAST_CAPSULE_VERSION})"
9+
echo "You can force the values by setting these environment variables:"
10+
echo "- CAPSULE_OS (linux, darwin)"
11+
echo "- CAPSULE_ARCH (amd64, arm64)"
12+
echo "- CAPSULE_VERSION"
13+
exit 0
14+
fi
15+
16+
if [ -z "$CAPSULE_VERSION" ]
17+
then
18+
CAPSULE_VERSION=$LAST_CAPSULE_VERSION
19+
fi
20+
21+
if [ -z "$CAPSULE_OS" ]
22+
then
23+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
24+
CAPSULE_OS="linux"
25+
elif [[ "$OSTYPE" == "darwin"* ]]; then
26+
CAPSULE_OS="darwin"
27+
else
28+
CAPSULE_OS="linux"
29+
fi
30+
fi
31+
32+
if [ -z "$CAPSULE_ARCH" ]
33+
then
34+
if [[ "$(uname -m)" == "x86_64" ]]; then
35+
CAPSULE_ARCH="amd64"
36+
elif [[ "$(uname -m)" == "arm64" ]]; then
37+
CAPSULE_ARCH="arm64"
38+
elif [[ $(uname -m) == "aarch64" ]]; then
39+
CAPSULE_ARCH="arm64"
40+
else
41+
CAPSULE_ARCH="amd64"
42+
fi
43+
fi
44+
345
CAPSULE_MODULE="caps"
446

547
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
@@ -20,7 +62,7 @@ fi
2062

2163
CAPSULE_ARCH=$(uname -m)
2264

23-
echo "💊 Installing ${CAPSULE_MODULE}..."
65+
echo "Installing ${CAPSULE_MODULE}..."
2466
wget https://github.com/bots-garden/capsule/releases/download/${CAPSULE_VERSION}/${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
2567
sudo tar -zxf ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz --directory /usr/local/bin
2668
rm ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz

install-capsule-launcher.sh

+44-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
#!/bin/bash
2-
CAPSULE_VERSION="0.1.7"
2+
LAST_CAPSULE_VERSION="0.1.8"
3+
echo "System: ${OSTYPE} $(uname -m)"
4+
5+
if [[ $1 = "help" ]]
6+
then
7+
echo "usage: $0"
8+
echo "The script will detect the OS & ARCH and use the last version of capsule (${LAST_CAPSULE_VERSION})"
9+
echo "You can force the values by setting these environment variables:"
10+
echo "- CAPSULE_OS (linux, darwin)"
11+
echo "- CAPSULE_ARCH (amd64, arm64)"
12+
echo "- CAPSULE_VERSION"
13+
exit 0
14+
fi
15+
16+
if [ -z "$CAPSULE_VERSION" ]
17+
then
18+
CAPSULE_VERSION=$LAST_CAPSULE_VERSION
19+
fi
20+
21+
if [ -z "$CAPSULE_OS" ]
22+
then
23+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
24+
CAPSULE_OS="linux"
25+
elif [[ "$OSTYPE" == "darwin"* ]]; then
26+
CAPSULE_OS="darwin"
27+
else
28+
CAPSULE_OS="linux"
29+
fi
30+
fi
31+
32+
if [ -z "$CAPSULE_ARCH" ]
33+
then
34+
if [[ "$(uname -m)" == "x86_64" ]]; then
35+
CAPSULE_ARCH="amd64"
36+
elif [[ "$(uname -m)" == "arm64" ]]; then
37+
CAPSULE_ARCH="arm64"
38+
elif [[ $(uname -m) == "aarch64" ]]; then
39+
CAPSULE_ARCH="arm64"
40+
else
41+
CAPSULE_ARCH="amd64"
42+
fi
43+
fi
44+
345
CAPSULE_MODULE="capsule"
446

547
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
@@ -20,7 +62,7 @@ fi
2062

2163
CAPSULE_ARCH=$(uname -m)
2264

23-
echo "💊 Installing ${CAPSULE_MODULE}..."
65+
echo "Installing ${CAPSULE_MODULE}..."
2466
wget https://github.com/bots-garden/capsule/releases/download/${CAPSULE_VERSION}/${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
2567
sudo tar -zxf ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz --directory /usr/local/bin
2668
rm ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz

install-capsule-registry.sh

+44-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
#!/bin/bash
2-
CAPSULE_VERSION="0.1.7"
2+
LAST_CAPSULE_VERSION="0.1.8"
3+
echo "System: ${OSTYPE} $(uname -m)"
4+
5+
if [[ $1 = "help" ]]
6+
then
7+
echo "usage: $0"
8+
echo "The script will detect the OS & ARCH and use the last version of capsule (${LAST_CAPSULE_VERSION})"
9+
echo "You can force the values by setting these environment variables:"
10+
echo "- CAPSULE_OS (linux, darwin)"
11+
echo "- CAPSULE_ARCH (amd64, arm64)"
12+
echo "- CAPSULE_VERSION"
13+
exit 0
14+
fi
15+
16+
if [ -z "$CAPSULE_VERSION" ]
17+
then
18+
CAPSULE_VERSION=$LAST_CAPSULE_VERSION
19+
fi
20+
21+
if [ -z "$CAPSULE_OS" ]
22+
then
23+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
24+
CAPSULE_OS="linux"
25+
elif [[ "$OSTYPE" == "darwin"* ]]; then
26+
CAPSULE_OS="darwin"
27+
else
28+
CAPSULE_OS="linux"
29+
fi
30+
fi
31+
32+
if [ -z "$CAPSULE_ARCH" ]
33+
then
34+
if [[ "$(uname -m)" == "x86_64" ]]; then
35+
CAPSULE_ARCH="amd64"
36+
elif [[ "$(uname -m)" == "arm64" ]]; then
37+
CAPSULE_ARCH="arm64"
38+
elif [[ $(uname -m) == "aarch64" ]]; then
39+
CAPSULE_ARCH="arm64"
40+
else
41+
CAPSULE_ARCH="amd64"
42+
fi
43+
fi
44+
345
CAPSULE_MODULE="capsule-registry"
446

547
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
@@ -20,7 +62,7 @@ fi
2062

2163
CAPSULE_ARCH=$(uname -m)
2264

23-
echo "💊 Installing ${CAPSULE_MODULE}..."
65+
echo "Installing ${CAPSULE_MODULE}..."
2466
wget https://github.com/bots-garden/capsule/releases/download/${CAPSULE_VERSION}/${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz
2567
sudo tar -zxf ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz --directory /usr/local/bin
2668
rm ${CAPSULE_MODULE}-${CAPSULE_VERSION}-${CAPSULE_OS}-${CAPSULE_ARCH}.tar.gz

0 commit comments

Comments
 (0)