-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Support for experimental plugins in packaging #332
Conversation
Signed-off-by: Tibor Vass <tibor@docker.com>
Merge is currently pending docker/cli#1902 |
Similar will be needed in ee-packaging for ee-specific plugins that need to be experimental. |
@@ -12,6 +13,7 @@ add_github_ssh_host() { | |||
} | |||
|
|||
install_binary() { | |||
[ -n "${EXPERIMENTAL_PLUGIN}" ] && PREFIX=${PREFIX}-experimental |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be preferable to do something like this:
[ -n "${EXPERIMENTAL_PLUGIN}" ] && PREFIX=${PREFIX}-experimental | |
local install_prefix="${PREFIX}" | |
if [ -n "${EXPERIMENTAL_PLUGIN}" ]; then | |
install_prefix="${PREFIX}-experimental" | |
fi |
Then change line 19 from ${PREFIX}
to ${install_prefix}
that way we can avoid changing global variables
@@ -12,6 +13,7 @@ add_github_ssh_host() { | |||
} | |||
|
|||
install_binary() { | |||
[ -n "${EXPERIMENTAL_PLUGIN}" ] && PREFIX=${PREFIX}-experimental | |||
for binary in "$@"; do | |||
mkdir -p "${DESTDIR}${PREFIX}" | |||
install -p -m 755 "${binary}" "${DESTDIR}${PREFIX}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install -p -m 755 "${binary}" "${DESTDIR}${PREFIX}" | |
install -p -m 755 "${binary}" "${DESTDIR}${install_prefix}" |
@@ -18,8 +19,10 @@ build() { | |||
git fetch --all | |||
git checkout -q "${COMMIT}" | |||
local LDFLAGS | |||
# TODO: unmark `-tp` when no longer a technical preview | |||
LDFLAGS="-X ${PKG}/version.Version=$(git describe --match 'v[0-9]*' --always --tags)-tp -X ${PKG}/version.Revision=$(git rev-parse HEAD) -X ${PKG}/version.Package=${PKG}" | |||
local VERSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might also be useful to name this something different as to avoid overwriting the global VERSION
we use for the dockerd/docker-cli builds.
I think this one can be closed |
Signed-off-by: Tibor Vass tibor@docker.com
To be tested.
Related to docker/cli#1902