Skip to content

Instantly share code, notes, and snippets.

@debovema
Last active February 27, 2019 14:44
Show Gist options
  • Save debovema/78095d87578c092372037b1dbf05454d to your computer and use it in GitHub Desktop.
Save debovema/78095d87578c092372037b1dbf05454d to your computer and use it in GitHub Desktop.
Test the installation of contribution "github.com/square-it/flogo-opentracing-listener@v0.0.2" with 'go get' and 'go mod' methods
#!/bin/bash
# clear cache
rm -rf /go/pkg/mod/*
# clear app if it exists
rm -rf /tmp/app
# create app
cd /tmp
flogo create app
# edit app (because of unmerged dependencies)
cd /tmp/app
echo "replace github.com/project-flogo/flow => github.com/debovema/flow patch-1" >> ./src/go.mod
sed -i 's|github.com/project-flogo/core .*|github.com/project-flogo/core master|' ./src/go.mod
# build app
flogo build -e
# install contribution
flogo install github.com/square-it/flogo-opentracing-listener@v0.0.2
# build app
flogo build -e
#!/bin/bash
# install CLI (from project-flogo:master)
go get -u github.com/project-flogo/cli/...
time ./test_common.sh
#!/bin/bash
# install CLI (from fork square-it:install-contribs-with-version)
git clone https://github.com/square-it/cli.git /tmp/cli
cd /tmp/cli
git checkout install-contribs-with-version
echo "replace github.com/project-flogo/core => github.com/square-it/core generate-json-schema" >> go.mod
go install ./...
cd -
time ./test_common.sh
#!/bin/bash
cd /tmp
wget -q https://gist.githubusercontent.com/debovema/78095d87578c092372037b1dbf05454d/raw/1094301d54b3b1a4a3272d45d0b3df9546f2d8a3/test_common.sh
wget -q https://gist.githubusercontent.com/debovema/78095d87578c092372037b1dbf05454d/raw/1094301d54b3b1a4a3272d45d0b3df9546f2d8a3/test_go_get.sh
wget -q https://gist.githubusercontent.com/debovema/78095d87578c092372037b1dbf05454d/raw/1094301d54b3b1a4a3272d45d0b3df9546f2d8a3/test_go_mod.sh
chmod u+x *.sh
/tmp/test_go_get.sh
/tmp/test_go_mod.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment