Skip to content

Commit

Permalink
Add auto release
Browse files Browse the repository at this point in the history
  • Loading branch information
dz0ny committed Aug 27, 2018
1 parent 120772d commit 0ab3de5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ before_script:
script: bin/phpunit
after_script:
- bin/coveralls -v
deploy:
- provider: script
skip_cleanup: true
script:
- "yes yes | svn --username=$SVN_USER --password=$SVN_PASSWORD ls http://plugins.svn.wordpress.org/spiderblocker &>/dev/null"
- "make publish"
on:
tags: true
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ SVNUSER := niteoweb
test:
bin/phpunit

release:
zip:
mkdir -p build
cp -ar src $(PLUGINSLUG)
zip -r $(PLUGINSLUG).zip $(PLUGINSLUG)
rm -rf $(PLUGINSLUG)
mv $(PLUGINSLUG).zip build/

deploy:
publish:
@rm -fr /tmp/$(PLUGINSLUG)/
svn co http://plugins.svn.wordpress.org/$(PLUGINSLUG)/ /tmp/$(PLUGINSLUG)
cp -ar $(SRCPATH)/* /tmp/$(PLUGINSLUG)/trunk/
Expand All @@ -23,3 +23,12 @@ deploy:
cd /tmp/$(PLUGINSLUG)/; svn copy trunk/ tags/$(VERSION)/
cd /tmp/$(PLUGINSLUG)/tags/$(VERSION)/; svn commit --username=$(SVNUSER) -m "Tagging version $(VERSION)"
# rm -fr /tmp/$(PLUGINSLUG)/

release:
git stash
git fetch -p
git checkout master
git pull -r
git tag $(VERSION)
git push origin $(VERSION)
git pull -r

0 comments on commit 0ab3de5

Please sign in to comment.