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

Add the sprig functions in the template engine #1891

Merged
merged 2 commits into from
Aug 10, 2017
Merged

Conversation

terlenbach
Copy link
Contributor

Description

This PR is the implementation of #1848. Basically it adds the sprig library (https://github.com/Masterminds/sprig) to the template engine.

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

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

build.Dockerfile Outdated
@@ -12,7 +12,8 @@ RUN go get github.com/jteeuwen/go-bindata/... \
&& go get github.com/kisielk/errcheck \
&& go get github.com/client9/misspell/cmd/misspell \
&& go get github.com/mattfarina/glide-hash \
&& go get github.com/sgotti/glide-vc
&& go get github.com/sgotti/glide-vc \
&& go get github.com/Masterminds/sprig
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👌

@ldez ldez added the kind/enhancement a new or improved feature. label Jul 24, 2017
@ldez
Copy link
Contributor

ldez commented Jul 24, 2017

Could you do that:

  1. Revert glide.yml, glide.lock and vendor changes. After that you must have nothing in the git stage.
  2. Use the github.com/multiplay/glide-pin plugin: glide pin --exact
  3. Commit the glide.yml with pinned version
  4. Add dependency: ./script/glide.sh get YOUR/DEPENDENCY
  5. Commit glide.yml, glide.lock and vendor
  6. Revert the pin commit: git revert HASH_OF_PIN_COMMIT
  7. Edit manually glide.yml to add the dependency
  8. Use glide-hash to get the manifest file hash and put it in the lock file to please validate-glide.
  9. Commit glide.yml and glide.lock
  10. Squash all previous commit: git rebase -i HASH

@ldez
Copy link
Contributor

ldez commented Jul 24, 2017

please follow exactly my previous comment:

  • first, revert all your changes on glide.lock, glide.yml and vendor (step 1)

@emilevauge
Copy link
Member

Hi @thomasbach76, thanks for your great contribution!
Design LGTM

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

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

Thanks 👍

Could you add some explanations and a reference to sprig in our documentation?

if configuration == nil {
t.Fatal("Configuration should not be nil, but was")
}
if n := len(configuration.Backends); n != 1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

n := len(configuration.Backends); n != 1 --> len(configuration.Backends) != 1

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

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

Great job!

LGTM!

@terlenbach
Copy link
Contributor Author

Not sure why the semaphoreci check failed here...

@ldez
Copy link
Contributor

ldez commented Jul 25, 2017

It's not you, I have relaunch the build.

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement a new or improved feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants