Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

How to add your module to the directory

Swoogan edited this page · 8 revisions

Ideal

  1. Get a link to your module (PSM1 or ZIP file). See below for details.
  2. Fork https://github.com/psget/psget/
  3. Find the Directory.xml file. This is the atom feed with all modules.
  4. Add or update your module (take any other module as an example).
  5. Test your module using the local Directory.xml as the module source: install-module mynewmodule -DirectoryUrl "file://${pwd}/Directory.xml".
    This assumes your current directory is your git checkout directory; otherwise replace ${pwd} with the appropriate path.
  6. Decide if any code needs to be executed to complete the installation. Also check to see if you have an Install.ps1 file which should not be executed for PsGet-installations. If one of the two is valid for your module, please read How to execute arbitrary code after install? below.
  7. Commit and send me pull request.
  8. It will be available in main repo shortly.

Super Lazy

  1. Create a ticket in Issues section, put some information how to find your module.
  2. It will be available in the main repo eventually.

FAQ

How to package module?

If you have single PSM1 file, you are done. Nothing else is needed or required. If your module is more then one script or have resources like images or even DLLs. Just ZIP the module folder. PsGet is smart enough to find module within your ZIP file.

Where to get link?

If you have single PSM1 file and you host it on GitHub, just give a raw link, something like https://raw.github.com/chaliy/psurl/master/PsUrl/PsUrl.psm1 . If you want to distribute your module as a ZIP and you host your code on GitHub, you can find the ZIP button on your repository home page and copy link, something like http://github.com/psget/psget/zipball/master , this will be link to your ZIP file. Also you can find links to ZIP files for your tags.

How to execute arbitrary code after install?

If nothing else is configured in Directory.xml PsGet checks to see if there is a file named Install.ps1 along with your module file and executes it automatically for both installations and updates. If you don't want to execute Install.ps1 then you have to add the DoNotPostInstall to the xml (see below). If you want to execute Install.ps1 or another file for installations and not updates, you should add an invalid name as PostUpdateHook (best would be none). The file has to be a *.ps1-file. You can see a complex example below:

<entry>
    <id>HelloWorldWithoutPostInUp</id>
    <title type="text">HelloWorldWithoutPostInUp</title>
    <summary type="text">Zipped simple test module for PsGet.</summary>
    <updated>2011-05-01T15:52:10-07:00</updated>
    <author>
      <name>Florian Freudenberg</name>
    </author>    
    <content type="application/zip" src="https://github.com/psget/psget/raw/master/TestModules/HelloWorldWithPostInUp.zip" />
    <psget:properties>
      <psget:ModuleName>HelloWorld</psget:ModuleName>
      <psget:ProjectUrl>https://github.com/chaliy/psget/</psget:ProjectUrl> 
      <psget:NoPostInstallHook>[true/false]</psget:NoPostInstallHook> 
      <psget:PostInstallHook>[PostInstall.ps1/none]</psget:PostInstallHook>
      <psget:PostUpdateHook>[PostUpdate.ps1/none]</psget:PostUpdateHook>         
    </psget:properties>
  </entry>
Something went wrong with that request. Please try again.