links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Posting a Package to a Package Universe
Last updated at 10:08 am UTC on 20 June 2007

Through the graphical interface

  1. Open the Package Universe Editor from the open... menu.
  2. Enter a login and a password
  3. Click on the create account button if you don't have an account yet
  4. Then click on 'New Package'
  5. Fill the fields taking examples from other packages (choose 'New Package Version' on the OmniBrowser package to have an example but do not submit).
  6. Submit your new package

After 10 minutes, it will appear on the Package Universe Browser after a click on 'update package list'.

Through code

It is only a little bit of code to post a package to a universe:

newPackage := UPackage new.
newPackage name: 'YourPackageName'.
newPackage depends: #('dependency1' 'dependency2').
newPackage description: 'here''s an example package'.
newPackage homepage: 'http://www.squeak.org' asUrl.
newPackage url: 'http://www.squeaksource.com/whatever' asUrl.
newPackage version: (UVersion readFromString: '1.0').
newPackage maintainer: 'Joe Blow <joe@blow.net>'.

client := UUniverseClient forUniverse: UUniverse developmentUniverse.
client sendMessage: (UMAddPackage username: 'USERNAME' password: 'PASSWORD' package: newPackage).

[ client receivedMessagesDo: [ :m | "m inspect."
                                                      (m class == UMPackageAdded or: [ m class == UMError ])
                                                                      ifTrue: [ ^self ] ].
   (Delay forSeconds: 1) wait. ]

You can put this in a workspace, or in a class method somewhere, so that you can invoke it whenever you are ready to make a release.