diff --git a/src/Makefile b/src/Makefile index 71ffedc..7d7e2b9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,14 @@ VERSION = $(shell cat ../VERSION) +VERSION = $(shell cat ../VERSION) subdirs = colab-spb-plugin colab-spb-theme-plugin noosfero-spb +NOOSFERO_REPO = 'git@softwarepublico.gov.br:softwarepublico/noosfero.git' +FILTER_LAST_TAG = $(shell tail -n 1 | sed 's/^.*\///') +NOOSFERO_REMOTE_VERSION = $(shell git ls-remote --tags 'git@softwarepublico.gov.br:softwarepublico/noosfero.git' | tail -n 1 | sed 's/^.*\///' | sed 's/\^{}//') +NOOSFERO_GITLAB_VERSION = $(shell git ls-remote --tags 'git@softwarepublico.gov.br:softwarepublico/noosfero.git' | tail -n 1 | sed 's/^.*\///'| sed 's/+/%2B/' | sed 's/\^{}//') +#NOOSFERO_GITLAB_VERSION = $(shell $(NOOSFERO_REMOTE_VERSION) | sed 's/+/%2B/') +ACTUAL_NOOSFERO_VERSION = $(shell cat pkg-rpm/noosfero/noosfero.spec | grep Version | sed 's/^.*\s//') + dist_all = $(patsubst %, %-dist, $(subdirs)) dist: $(dist_all) $(dist_all): %-dist : % @@ -15,7 +23,7 @@ $(clean_all): %-clean : % if [ -f $*/Makefile ]; then make -C $* clean; fi if [ -f $*/setup.py ]; then rm -rf $*/dist; fi -release: +release_plugins: @if git tag | grep -q '^v$(VERSION)$$'; then \ echo "E: version $(VERSION) already tagged. You need a new version number"; \ false; \ @@ -47,3 +55,9 @@ release: # TODO add pkg-rpm/colab-spb-plugin to the git checkout all above $(MAKE) -C pkg-rpm/ noosfero-spb-upload colab-spb-theme-upload colab-spb-plugin-upload git tag $(VERSION) -s -m 'SPB Release $(VERSION)' + +release_noosfero: + wget https://softwarepublico.gov.br/gitlab/softwarepublico/noosfero/repository/archive.tar.gz?ref=$(NOOSFERO_GITLAB_VERSION) --no-check-certificate -O pkg-rpm/noosfero/noosfero-$(NOOSFERO_REMOTE_VERSION).tar.gz + sed -i -e 's/^\(Version:\s*\).*/\1$(NOOSFERO_REMOTE_VERSION)/' \ + pkg-rpm/noosfero/noosfero.spec + $(MAKE) -C pkg-rpm/ noosfero-build -- libgit2 0.21.2