Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions build-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/bash

set -e

PACKAGE_DIR="package"
TARGET_DIR="dependencies-src"
REPO_URL="https://github.com/open-edge-platform/orch-cli.git"
REPO_NAME="orch-cli"
CLONE_DIR="source-$REPO_NAME"

mkdir -p "$TARGET_DIR"

make build

sudo rm -rf "$PACKAGE_DIR"
mkdir "$PACKAGE_DIR"
mkdir "$PACKAGE_DIR/$CLONE_DIR"
mkdir "$PACKAGE_DIR/$TARGET_DIR"

cp build/_output/orch-cli "$PACKAGE_DIR/"
cp go.mod go.sum "$PACKAGE_DIR/"

echo "Cloning your repository from $REPO_URL..."
git clone "$REPO_URL" "$PACKAGE_DIR/$CLONE_DIR"

echo "Extracting dependencies from go.mod..."

cd "$PACKAGE_DIR"
while read -r mod ver; do
# Skip empty lines or lines starting with #
[[ -z "$mod" || "$mod" =~ ^# ]] && continue
echo "Package: $mod"
echo "Version: $ver"
go mod download "$mod@$ver"
modpath=$(go list -f '{{.Dir}}' -m "$mod@$ver")
if [ -d "$modpath" ]; then
cp -r --no-preserve=mode,ownership "$modpath" "$TARGET_DIR/"
fi
done < ../sbom.txt

echo "All sources and repo archive are in $PACKAGE_DIR/"

echo "Creating package archive..."
tar -czf "../orch-cli-package.tar.gz" \
"orch-cli" \
"$CLONE_DIR" \
"$(basename "$TARGET_DIR")"

cd ..

echo "Package created at .$PACKAGE_DIR/orch-cli-package.tar.gz"
121 changes: 121 additions & 0 deletions sbom.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
ariga.io/atlas v0.15.0
entgo.io/ent v0.12.5
github.com/agext/levenshtein v1.2.1
github.com/apapsch/go-jsonmerge/v2 v2.0.0
github.com/apparentlymart/go-textseg/v13 v13.0.0
github.com/atomix/dazl v1.1.4
github.com/bytedance/sonic v1.11.3
github.com/cenkalti/backoff/v3 v3.2.2
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d
github.com/chenzhuoyu/iasm v0.9.1
github.com/cpuguy83/go-md2man/v2 v2.0.3
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/emicklei/go-restful/v3 v3.11.0
github.com/envoyproxy/protoc-gen-validate v1.0.4
github.com/fsnotify/fsnotify v1.7.0
github.com/gabriel-vasile/mimetype v1.4.3
github.com/gin-contrib/sse v0.1.0
github.com/gin-gonic/gin v1.9.1
github.com/go-jose/go-jose/v3 v3.0.4
github.com/go-jose/go-jose/v4 v4.0.5
github.com/go-logr/logr v1.4.1
github.com/go-openapi/inflect v0.19.0
github.com/go-openapi/jsonpointer v0.19.6
github.com/go-openapi/jsonreference v0.20.2
github.com/go-openapi/swag v0.22.3
github.com/go-playground/locales v0.14.1
github.com/go-playground/universal-translator v0.18.1
github.com/go-playground/validator/v10 v10.19.0
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572
github.com/goccy/go-json v0.10.2
github.com/gogo/protobuf v1.3.2
github.com/golang-jwt/jwt/v5 v5.2.2
github.com/golang/protobuf v1.5.4
github.com/google/gnostic-models v0.6.8
github.com/google/go-cmp v0.6.0
github.com/google/gofuzz v1.2.0
github.com/google/uuid v1.6.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0
github.com/hashicorp/errwrap v1.1.0
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/hashicorp/go-rootcerts v1.0.2
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2
github.com/hashicorp/go-sockaddr v1.0.2
github.com/hashicorp/hcl v1.0.1-vault-5
github.com/hashicorp/hcl/v2 v2.13.0
github.com/hashicorp/vault/api v1.14.0
github.com/inconshreveable/mousetrap v1.1.0
github.com/joho/godotenv v1.5.1
github.com/josharian/intern v1.0.0
github.com/json-iterator/go v1.1.12
github.com/klauspost/cpuid/v2 v2.2.7
github.com/leodido/go-urn v1.4.0
github.com/magiconair/properties v1.8.7
github.com/mailru/easyjson v0.7.7
github.com/mattn/go-isatty v0.0.20
github.com/mattn/go-sqlite3 v1.14.18
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-wordwrap v1.0.1
github.com/mitchellh/mapstructure v1.5.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
github.com/modern-go/reflect2 v1.0.2
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
github.com/oapi-codegen/runtime v1.1.1
github.com/open-edge-platform/app-orch-catalog v0.11.32
github.com/open-edge-platform/app-orch-deployment/app-deployment-manager/api/nbi/v2 v2.3.21
github.com/open-edge-platform/orch-library/go v0.5.30
github.com/open-edge-platform/orch-library/go/dazl v0.5.4
github.com/pelletier/go-toml/v2 v2.2.0
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
github.com/russross/blackfriday/v2 v2.1.0
github.com/ryanuber/go-glob v1.0.0
github.com/sagikazarmark/locafero v0.4.0
github.com/sagikazarmark/slog-shim v0.1.0
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
github.com/sourcegraph/conc v0.3.0
github.com/spf13/afero v1.11.0
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.10.0
github.com/subosito/gotenv v1.6.0
github.com/twitchyliquid64/golang-asm v0.15.1
github.com/ugorji/go/codec v1.2.12
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415
github.com/xeipuuv/gojsonschema v1.2.0
github.com/zclconf/go-cty v1.8.0
go.uber.org/mock v0.5.0
go.uber.org/multierr v1.11.0
golang.org/x/arch v0.7.0
golang.org/x/crypto v0.35.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/mod v0.18.0
golang.org/x/net v0.36.0
golang.org/x/oauth2 v0.27.0
golang.org/x/sys v0.30.0
golang.org/x/term v0.29.0
golang.org/x/text v0.22.0
golang.org/x/time v0.5.0
google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117
google.golang.org/grpc v1.64.1
google.golang.org/protobuf v1.34.2
gopkg.in/inf.v0 v0.9.1
gopkg.in/ini.v1 v1.67.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
k8s.io/klog/v2 v2.120.1
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
sigs.k8s.io/yaml v1.3.0
Loading