Giter Site home page Giter Site logo

Comments (6)

RamblingCookieMonster avatar RamblingCookieMonster commented on July 17, 2024

Any suggestions on naming these?

Existing functions are named as they relate to the deployment:

The deployment is...

  • To a target
  • From a source
  • By a deploymenttype
  • DependingOn another deployment

etc.

Following that logic, 'Before' would seem more like a dependency option, or would be inverted:

  • This deployment runs Before some other deployment
  • This deployment runs Before this scriptblock (i.e. the scriptblock actually runs 'after')

That seems clunky and confusing.

Potential options, without much thought:

  • WithSetup, WithTeardown
  • WIthSetupScript, WithTeardownScript
  • WithPreScript, WithPostScript
  • Ignore current conventions, treat before and after as Pester does.

Any input would be appreciated!

from psdeploy.

RamblingCookieMonster avatar RamblingCookieMonster commented on July 17, 2024

Going with WithPreScript and WithPostScript, deployment object property PreScript and Postscript.

Open to alternatives though, seems clunky.

from psdeploy.

michaeltlombardi avatar michaeltlombardi commented on July 17, 2024

What about BeginWith and EndWith, deployment object properties of the same? Keeps the Begin, Process, End meaning understood from prior use of PowerShell.

Not really opposed to PreScript/PostScript though, it's pretty clear what that means too.

from psdeploy.

RamblingCookieMonster avatar RamblingCookieMonster commented on July 17, 2024

Initial implementation in dfe1ef4, some bug fixes in the following commits.

@michaeltlombardi I like that, it does follow with an existing convention. Unless something better comes up, I think the BeginWith and EndWith are a good option before merging into master

from psdeploy.

RamblingCookieMonster avatar RamblingCookieMonster commented on July 17, 2024

Bah, going to just leave it:

  • Name indicates purpose a bit more. 'Script' vs. BeginWith... something?
  • Code and tests are already in place
  • I'm lazy : )

BeginWithScript / EndWithScript would work for the first bullet, but fail the latter 3 : ) open to PRs if anyone wants to take the time though!

from psdeploy.

michaeltlombardi avatar michaeltlombardi commented on July 17, 2024

It's not a massive requirement - the current implementation is clear and sane as-is. This seems like more of a "someday, maybe, if we feel like it" enhancement. There's not really any standardization in this space that I'm aware of.

from psdeploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.