Skip to content

Commit 12b35ff

Browse files
authored
Merge branch 'master' into fix-rdb-connect-to-engine-public-or-private
2 parents 26f5111 + 3252886 commit 12b35ff

File tree

7 files changed

+50
-6
lines changed

7 files changed

+50
-6
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
fetch-depth: 1
4747
- name: Build binaries
4848
run: ./scripts/build.sh
49+
- name: Print binaries size
50+
run: ls -lh ./bin
51+
- name: Check binary size
52+
run: ./scripts/check-size.sh ./bin/*linux-x86_64
4953

5054
docker-tests:
5155
runs-on: ubuntu-latest

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ builds:
2222
- goos: darwin
2323
goarch: 386
2424
ldflags:
25+
- -s -w
2526
- -X main.Version={{ .Version }}
2627
- -X main.BuildDate={{ .Date }}
2728
- -X main.GitBranch={{ .Branch }}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/chzyer/readline v1.5.1
99
github.com/containerd/console v1.0.3
1010
github.com/dnaeon/go-vcr v1.2.0
11-
github.com/docker/docker v23.0.4+incompatible
11+
github.com/docker/docker v23.0.5+incompatible
1212
github.com/dustin/go-humanize v1.0.1
1313
github.com/fatih/color v1.15.0
1414
github.com/getsentry/raven-go v0.2.0
@@ -22,7 +22,7 @@ require (
2222
github.com/moby/buildkit v0.11.6
2323
github.com/opencontainers/go-digest v1.0.0
2424
github.com/pkg/errors v0.9.1
25-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16.0.20230424152630-05355b6e32c3
25+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16.0.20230425114903-9de7ce5b674f
2626
github.com/spf13/cobra v1.7.0
2727
github.com/spf13/pflag v1.0.5
2828
github.com/stretchr/testify v1.8.2

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=
8888
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
8989
github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
9090
github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
91-
github.com/docker/docker v23.0.4+incompatible h1:Kd3Bh9V/rO+XpTP/BLqM+gx8z7+Yb0AA2Ibj+nNo4ek=
92-
github.com/docker/docker v23.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
91+
github.com/docker/docker v23.0.5+incompatible h1:DaxtlTJjFSnLOXVNUBU1+6kXGz2lpDoEAH6QoxaSg8k=
92+
github.com/docker/docker v23.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
9393
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
9494
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
9595
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8=
@@ -274,8 +274,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
274274
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
275275
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
276276
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
277-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16.0.20230424152630-05355b6e32c3 h1:Qc8zmH5LqWj3veWJrX1tXrQU7O2QJCdAJ9oPPJfZM2s=
278-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16.0.20230424152630-05355b6e32c3/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
277+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16.0.20230425114903-9de7ce5b674f h1:h/skrTv7wKdxr88CjkD2cdVLaWqarBwXRQTE1XCraKg=
278+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16.0.20230425114903-9de7ce5b674f/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
279279
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
280280
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
281281
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=

internal/namespaces/ipfs/v1alpha1/ipfs_cli.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ func GetGeneratedCommands() *core.Commands {
2222
ipfsRoot(),
2323
ipfsIpfs(),
2424
ipfsVolume(),
25+
ipfsToken(),
2526
ipfsVolumeCreate(),
2627
ipfsVolumeGet(),
2728
ipfsVolumeList(),
@@ -60,6 +61,15 @@ func ipfsVolume() *core.Command {
6061
}
6162
}
6263

64+
func ipfsToken() *core.Command {
65+
return &core.Command{
66+
Short: `manage token in ipfs cli`,
67+
Long: `manage token in ipfs cli.`,
68+
Namespace: "ipfs",
69+
Resource: "token",
70+
}
71+
}
72+
6373
func ipfsVolumeCreate() *core.Command {
6474
return &core.Command{
6575
Short: `Create volume in S3 bucket`,

scripts/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
export CGO_ENABLED=0
44
LDFLAGS=(
5+
-s
56
-w
67
-extldflags
78
-static

scripts/check-size.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#/bin/env bash
2+
3+
MAX_BINARY_SIZE=25000000
4+
5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
7+
function usage() {
8+
echo "Usage:"
9+
echo " $SCRIPT_DIR [BINARY_FILE]"
10+
11+
echo ""
12+
exit "$1";
13+
}
14+
15+
if [[ $# -ne 1 ]]; then
16+
usage
17+
fi
18+
19+
BINARY_SIZE=$(stat -c %s $1)
20+
21+
echo "Binary size: $BINARY_SIZE"
22+
23+
if (( $BINARY_SIZE > $MAX_BINARY_SIZE )); then
24+
echo "Size is greater than limit"
25+
exit 1
26+
else
27+
echo "Size is valid"
28+
fi

0 commit comments

Comments
 (0)