Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

tiborvass
Copy link
Contributor

@tiborvass tiborvass commented May 23, 2019

Signed-off-by: Tibor Vass tibor@docker.com

To be tested.

Related to docker/cli#1902

Signed-off-by: Tibor Vass <tibor@docker.com>
@seemethere
Copy link
Contributor

Merge is currently pending docker/cli#1902

@tiborvass
Copy link
Contributor Author

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
Copy link
Contributor

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:

Suggested change
[ -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}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

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.

@tiborvass tiborvass changed the title Support for experimental plugins in packaging [WIP] Support for experimental plugins in packaging May 24, 2019
@seemethere
Copy link
Contributor

I think this one can be closed

@seemethere seemethere closed this May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants