You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2020/02/05 08:42:22 UTC

[incubator-annotator] branch master updated (a36d901 -> f11180b)

This is an automated email from the ASF dual-hosted git repository.

randall pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git.


    from a36d901  Add incubation disclaimer
     new 3fdb62f  Add -incubating and -rc to dists
     new f11180b  Add test and distcheck targets

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Makefile | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 64 insertions(+), 11 deletions(-)


[incubator-annotator] 02/02: Add test and distcheck targets

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git

commit f11180bf42dcf3297d4e99666824bb1467ad03e6
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Tue Feb 4 22:23:56 2020 -0800

    Add test and distcheck targets
---
 Makefile | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 1ea7352..9f085f7 100644
--- a/Makefile
+++ b/Makefile
@@ -57,10 +57,14 @@ build:
 clean:
 	@yarn run clean
 
+.PHONY: test
+test: build
+	@yarn test
+
 ifeq ($(vsn_tag),)
 
 .PHONY: dist
-dist:
+dist distcheck:
 	$(error No tag found for release)
 
 else
@@ -79,4 +83,9 @@ dist:
         > apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz.sha512
 	@echo "Done: apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz"
 
+.PHONY: distcheck
+distcheck: dist
+	@tar xzf apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz
+	@make -C apache-annotator-$(annotator_vsn)-incubating test
+
 endif


[incubator-annotator] 01/02: Add -incubating and -rc to dists

Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git

commit 3fdb62f191c8c60dcc65fd7bd722e24deec0bab0
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Feb 1 16:09:38 2020 -0800

    Add -incubating and -rc to dists
---
 Makefile | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 55 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 9967e05..1ea7352 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,41 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-ANNOTATOR_VERSION := $(shell jq -r .version < lerna.json)
+# Determine the version identifier from lerna.json or git.
+
+# Are we in a release?
+in_release = $(shell if [ ! -d .git ]; then echo true; fi)
+
+ifeq ($(in_release), true)
+
+# Get the version information from lerna.json.
+annotator_vsn = $(shell jq -r .version < lerna.json)
+
+else
+
+# Get the version information from git.
+
+# What is the prerelease version?
+vsn_pre = $(shell git describe --tags --always --first-parent \
+        | grep -Eo -- '(-rc\.[0-9]+)?$$' \
+        2>/dev/null)
+
+# What is the release version?
+vsn_rel = $(shell git describe --tags --always --first-parent \
+        | grep -Eo -- '^v[0-9]+\.[0-9]\.[0-9]+' \
+        | tail -c +2 \
+        2>/dev/null)
+
+# Is this a tagged release?
+vsn_tag = $(shell git describe --tags --always --first-parent \
+        | grep -Eo -- '^v[0-9]+\.[0-9]\.[0-9]+(-rc.[0-9]+)?$$' \
+        | tail -c +2 \
+        2>/dev/null)
+
+annotator_vsn = $(vsn_rel)
+
+endif
+
 
 .PHONY: all
 all: build
@@ -23,16 +57,26 @@ build:
 clean:
 	@yarn run clean
 
+ifeq ($(vsn_tag),)
+
+.PHONY: dist
+dist:
+	$(error No tag found for release)
+
+else
+
 .PHONY: dist
 dist:
-	@rm -rf apache-annotator-$(ANNOTATOR_VERSION)
+	@rm -rf apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating
 	@git archive \
-		--output apache-annotator-$(ANNOTATOR_VERSION).tar.gz \
-		--prefix apache-annotator-$(ANNOTATOR_VERSION)/ \
-		HEAD
-	@gpg -ab apache-annotator-$(ANNOTATOR_VERSION).tar.gz
-	@sha256sum apache-annotator-$(ANNOTATOR_VERSION).tar.gz \
-	  > apache-annotator-$(ANNOTATOR_VERSION).tar.gz.sha256
-	@sha512sum apache-annotator-$(ANNOTATOR_VERSION).tar.gz \
-	  > apache-annotator-$(ANNOTATOR_VERSION).tar.gz.sha512
-	@echo "Done: apache-annotator-$(ANNOTATOR_VERSION).tar.gz"
+        --output apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
+        --prefix apache-annotator-$(annotator_vsn)-incubating/ \
+        HEAD
+	@gpg -ab apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz
+	@sha256sum apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
+        > apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz.sha256
+	@sha512sum apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
+        > apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz.sha512
+	@echo "Done: apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz"
+
+endif