Skip to content

Instantly share code, notes, and snippets.

@mfojtik
Created February 5, 2020 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfojtik/471219467af369fb7b8ff432694f486d to your computer and use it in GitHub Desktop.
Save mfojtik/471219467af369fb7b8ff432694f486d to your computer and use it in GitHub Desktop.
library-go [trim-path L|✚ 1] > docker run -it --rm --workdir=/go/src/github.com/openshift/library-go -v `pwd`:/go/src/github.com/openshift/library-go registry.svc.ci.openshift.org/ocp/builder:golang-1.13 make -C alpha-build-machinery update
make: Entering directory `/go/src/github.com/openshift/library-go/alpha-build-machinery'
mkdir -p "./make/"
set -o pipefail; make -j 1 -C "./make/" -f "default.example.mk" --no-print-directory --warn-undefined-variables help 2>&1 | sed 's/\.\(buildDate\|versionFromGit\|commitFromGit\|gitTreeState\)="[^"]*" /.\1="<redacted_for_diff>" /g' | sed -E 's~/.*/(github.com/openshift/library-go/alpha-build-machinery/.*)~/\1~g' | sed '/\/tmp\/tmp./d' | sed '/git checkout -b/d' | sed -E 's~^[<> ]*((\+\+\+|\-\-\-) \./(testing/)?manifests/.*.yaml).*~\1~' | sed -E 's/^(make\[2\]: \*\*\* \[).*: (.*\] Error 1)/\1\2/' | grep -v 'are the same file' | grep -E -v -e '^make\[2\]: Target `.*'"'"' not remade because of errors\.$' | tee "./make/"/"default.example.mk".help.log
The following make targets are available:
all
build
clean
clean-binaries
help
image-ocp-cli
images
test
test-unit
update
update-bindata
update-codegen
update-deps-overrides
update-generated
update-gofmt
verify
verify-bindata
verify-codegen
verify-deps
verify-generated
verify-gofmt
verify-golint
verify-govet
diff -N "./make/default.example.mk.help.log" "./make//default.example.mk.help.log"
mkdir -p "./make/"
set -o pipefail; make -j 1 -C "./make/" -f "golang.example.mk" --no-print-directory --warn-undefined-variables help 2>&1 | sed 's/\.\(buildDate\|versionFromGit\|commitFromGit\|gitTreeState\)="[^"]*" /.\1="<redacted_for_diff>" /g' | sed -E 's~/.*/(github.com/openshift/library-go/alpha-build-machinery/.*)~/\1~g' | sed '/\/tmp\/tmp./d' | sed '/git checkout -b/d' | sed -E 's~^[<> ]*((\+\+\+|\-\-\-) \./(testing/)?manifests/.*.yaml).*~\1~' | sed -E 's/^(make\[2\]: \*\*\* \[).*: (.*\] Error 1)/\1\2/' | grep -v 'are the same file' | grep -E -v -e '^make\[2\]: Target `.*'"'"' not remade because of errors\.$' | tee "./make/"/"golang.example.mk".help.log
The following make targets are available:
all
build
clean
clean-binaries
help
test
test-unit
update
update-gofmt
verify
verify-gofmt
verify-golint
verify-govet
diff -N "./make/golang.example.mk.help.log" "./make//golang.example.mk.help.log"
mkdir -p "./make/"
set -o pipefail; make -j 1 -C "./make/" -f "operator.example.mk" --no-print-directory --warn-undefined-variables help 2>&1 | sed 's/\.\(buildDate\|versionFromGit\|commitFromGit\|gitTreeState\)="[^"]*" /.\1="<redacted_for_diff>" /g' | sed -E 's~/.*/(github.com/openshift/library-go/alpha-build-machinery/.*)~/\1~g' | sed '/\/tmp\/tmp./d' | sed '/git checkout -b/d' | sed -E 's~^[<> ]*((\+\+\+|\-\-\-) \./(testing/)?manifests/.*.yaml).*~\1~' | sed -E 's/^(make\[2\]: \*\*\* \[).*: (.*\] Error 1)/\1\2/' | grep -v 'are the same file' | grep -E -v -e '^make\[2\]: Target `.*'"'"' not remade because of errors\.$' | tee "./make/"/"operator.example.mk".help.log
The following make targets are available:
all
build
clean
clean-binaries
help
image-ocp-openshift-apiserver-operator
images
test
test-unit
update
update-bindata
update-codegen
update-deps-overrides
update-generated
update-gofmt
verify
verify-bindata
verify-codegen
verify-deps
verify-generated
verify-gofmt
verify-golint
verify-govet
diff -N "./make/operator.example.mk.help.log" "./make//operator.example.mk.help.log"
mkdir -p "./make/examples/multiple-binaries/"
set -o pipefail; make -j 1 -C "./make/examples/multiple-binaries/" -f "Makefile.test" --no-print-directory --warn-undefined-variables 2>&1 | sed 's/\.\(buildDate\|versionFromGit\|commitFromGit\|gitTreeState\)="[^"]*" /.\1="<redacted_for_diff>" /g' | sed -E 's~/.*/(github.com/openshift/library-go/alpha-build-machinery/.*)~/\1~g' | sed '/\/tmp\/tmp./d' | sed '/git checkout -b/d' | sed -E 's~^[<> ]*((\+\+\+|\-\-\-) \./(testing/)?manifests/.*.yaml).*~\1~' | sed -E 's/^(make\[2\]: \*\*\* \[).*: (.*\] Error 1)/\1\2/' | grep -v 'are the same file' | grep -E -v -e '^make\[2\]: Target `.*'"'"' not remade because of errors\.$' | tee "./make/examples/multiple-binaries/"/"Makefile.test".log
make build SOURCE_GIT_TAG=v42.43.44 SOURCE_GIT_COMMIT=aaa SOURCE_GIT_TREE_STATE=clean
go build -trimpath -ldflags "-s -w -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.versionFromGit="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.commitFromGit="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.gitTreeState="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.buildDate="<redacted_for_diff>" -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/cmd/oc
go build -trimpath -ldflags "-s -w -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.versionFromGit="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.commitFromGit="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.gitTreeState="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.buildDate="<redacted_for_diff>" -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/cmd/openshift
[[ -f ./openshift ]]
[[ -f ./oc ]]
# test version is set correctly when linking
# majorFromGit, minorFromGit are deprecated upstream and set to empty value
# we avoid comparing time to avoid flakes
diff <( ./oc | sed '$d' ) <( \
echo '' && \
echo '' && \
echo 'aaa' && \
echo 'v42.43.44' && \
echo 'clean' \
)
make clean
rm -f oc openshift
rm -f -r '/github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/_output/srpms'
if [ -d '_output' ]; then rmdir --ignore-fail-on-non-empty '_output'; fi
rm -f '_output/tools/bin/controller-gen'
if [ -d '_output/tools/bin/' ]; then rmdir --ignore-fail-on-non-empty -p '_output/tools/bin/'; fi
rm -f '_output/tools/bin/yq'
if [ -d '_output/tools/bin/' ]; then rmdir --ignore-fail-on-non-empty -p '_output/tools/bin/'; fi
rm -f -r '_output/bin'
if [ -d '_output' ]; then rmdir --ignore-fail-on-non-empty '_output'; fi
[[ ! -f ./openshift ]]
[[ ! -f ./oc ]]
make clean
rm -f oc openshift
rm -f -r '/github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/_output/srpms'
if [ -d '_output' ]; then rmdir --ignore-fail-on-non-empty '_output'; fi
rm -f '_output/tools/bin/controller-gen'
if [ -d '_output/tools/bin/' ]; then rmdir --ignore-fail-on-non-empty -p '_output/tools/bin/'; fi
rm -f '_output/tools/bin/yq'
if [ -d '_output/tools/bin/' ]; then rmdir --ignore-fail-on-non-empty -p '_output/tools/bin/'; fi
rm -f -r '_output/bin'
if [ -d '_output' ]; then rmdir --ignore-fail-on-non-empty '_output'; fi
[[ ! -d ./_output/ ]] || (ls -l ./_output/ && false)
total 0
drwxr-xr-x 3 root root 96 Sep 24 09:15 tools
make[1]: *** [test-cross-build] Error 1
make: *** [update-makefiles] Error 2
make: Leaving directory `/go/src/github.com/openshift/library-go/alpha-build-machinery'
library-go [trim-path L|✚ 1] > cat alpha-build-machinery/make/examples/multiple-binaries/Makefile.test.log
make build SOURCE_GIT_TAG=v42.43.44 SOURCE_GIT_COMMIT=aaa SOURCE_GIT_TREE_STATE=clean
go build -trimpath -ldflags "-s -w -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.versionFromGit="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.commitFromGit="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.gitTreeState="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.buildDate="<redacted_for_diff>" -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/cmd/oc
go build -trimpath -ldflags "-s -w -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.versionFromGit="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.commitFromGit="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.gitTreeState="<redacted_for_diff>" -X github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/pkg/version.buildDate="<redacted_for_diff>" -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/cmd/openshift
[[ -f ./openshift ]]
[[ -f ./oc ]]
# test version is set correctly when linking
# majorFromGit, minorFromGit are deprecated upstream and set to empty value
# we avoid comparing time to avoid flakes
diff <( ./oc | sed '$d' ) <( \
echo '' && \
echo '' && \
echo 'aaa' && \
echo 'v42.43.44' && \
echo 'clean' \
)
make clean
rm -f oc openshift
rm -f -r '/github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/_output/srpms'
if [ -d '_output' ]; then rmdir --ignore-fail-on-non-empty '_output'; fi
rm -f '_output/tools/bin/controller-gen'
if [ -d '_output/tools/bin/' ]; then rmdir --ignore-fail-on-non-empty -p '_output/tools/bin/'; fi
rm -f '_output/tools/bin/yq'
if [ -d '_output/tools/bin/' ]; then rmdir --ignore-fail-on-non-empty -p '_output/tools/bin/'; fi
rm -f -r '_output/bin'
if [ -d '_output' ]; then rmdir --ignore-fail-on-non-empty '_output'; fi
[[ ! -f ./openshift ]]
[[ ! -f ./oc ]]
make clean
rm -f oc openshift
rm -f -r '/github.com/openshift/library-go/alpha-build-machinery/make/examples/multiple-binaries/_output/srpms'
if [ -d '_output' ]; then rmdir --ignore-fail-on-non-empty '_output'; fi
rm -f '_output/tools/bin/controller-gen'
if [ -d '_output/tools/bin/' ]; then rmdir --ignore-fail-on-non-empty -p '_output/tools/bin/'; fi
rm -f '_output/tools/bin/yq'
if [ -d '_output/tools/bin/' ]; then rmdir --ignore-fail-on-non-empty -p '_output/tools/bin/'; fi
rm -f -r '_output/bin'
if [ -d '_output' ]; then rmdir --ignore-fail-on-non-empty '_output'; fi
[[ ! -d ./_output/ ]] || (ls -l ./_output/ && false)
total 0
drwxr-xr-x 3 root root 96 Sep 24 09:15 tools
make[1]: *** [test-cross-build] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment