Posting a Package to a Package Universe
Last updated at 10:08 am UTC on 20 June 2007
Through the graphical interface
- Open the Package Universe Editor from the open... menu.
- Enter a login and a password
- Click on the create account button if you don't have an account yet
- Then click on 'New Package'
- Fill the fields taking examples from other packages (choose 'New Package Version' on the OmniBrowser package to have an example but do not submit).
- 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. ]
repeat.
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.