[Zope-dev] curl comes through (Re: command-line zope.org product upload ?)
Simon Michael
simon@joyful.com
19 Jun 2001 17:25:05 -0700
Now I can do something like
> make zdoreleaseall
creating ZWiki-0.9.3.tgz release on zope.org
uploading ZWiki-0.9.3.tgz
configuring ZWiki-0.9.3.tgz properties
submitting ZWiki-0.9.3.tgz to the catalog
creating ZWiki-0.9.3-released news item on zope.org
configuring ZWiki-0.9.3-released properties
submitting ZWiki-0.9.3-released to the catalog
>
Here are the makefile recipes with the magic curl incantations.
A zope.org entry in ~/.netrc is assumed.
PRODUCT=ZWiki
VERSION=0.9.3
STATUS=Development
TITLE=
PLATFORM=All
PRODUCTURL=http://zope.org/Members/simon/ZWiki
FILE=$(PRODUCT)-$(VERSION).tgz
zdoreleaseall: zdorelease zdorelease-catalog zdoannounce zdoannounce-catalog
zdorelease: zdorelease-create zdorelease-upload zdorelease-configure
zdorelease-create:
@echo creating $(FILE) release on zope.org
@curl -s -n -Fid=$(FILE) -Ftitle='' -Ffile=@releases/$(FILE) $(PRODUCTURL)/manage_addProduct/ZopeSite/Release_factory/Release_add -o /dev/null
zdorelease-upload:
@echo uploading $(FILE)
@curl -n -F"file=@releases/$(FILE);type=application/x-tgz" $(PRODUCTURL)/$(FILE)/editFile -o /dev/null
zdorelease-configure:
@echo configuring $(FILE) properties
@curl -s -n -Ftitle=$(TITLE) -Fversion=$(VERSION) -Fstatus=$(STATUS) -Fplatform=$(PLATFORM) $(PRODUCTURL)/$(FILE)/editItem -o /dev/null
zdorelease-catalog:
@echo submitting $(FILE) to the catalog
@curl -s -n -F"submit= Request Entry " $(PRODUCTURL)/$(FILE)/manageCatalog -o /dev/null
NEWSITEM=$(PRODUCT)-$(VERSION)-released
NEWSTEXT=`echo "/^\w.*$(VERSION)/;/^\w/-1p" |ed -s Changelog`
zdoannounce: zdoannounce-create zdoannounce-configure
zdoannounce-create:
@echo creating $(NEWSITEM) news item on zope.org
@curl -s -n -Fid=$(NEWSITEM) -Ftitle="" -Ftext="" -F"submit= Add " $(PRODUCTURL)/manage_addProduct/ZopeSite/fNewsItem/addNewsItem -o /dev/null
zdoannounce-configure:
@echo configuring $(NEWSITEM) properties
@echo "/^\w.*$(VERSION)/;/^\w/-1p" |ed -s Changelog | curl -s -n -F'text=<-' -Ftitle="$(PRODUCT) $(VERSION) released" -FNewsItem_topics=Announcement -F"format=Structured Text" $(PRODUCTURL)/$(NEWSITEM)/editItem -o /dev/null
zdoannounce-catalog:
@echo submitting $(NEWSITEM) to the catalog
@curl -s -n $(PRODUCTURL)/$(NEWSITEM)/manageCatalog -o /dev/null