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/05/05 05:12:18 UTC

[incubator-annotator] branch clone-dist updated (938fc5f -> 946fd38)

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

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


 discard 938fc5f  Make dist by creating a shallow clone
     new 946fd38  Create distributions with git clone

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (938fc5f)
            \
             N -- N -- N   refs/heads/clone-dist (946fd38)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 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:


[incubator-annotator] 01/01: Create distributions with git clone

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

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

commit 946fd382ff4721465fa97217029adafb08b0d1cb
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Mon May 4 20:54:07 2020 -0700

    Create distributions with git clone
    
    Create distribution tarballs by creating a shallow git clone.
    
    Distributing a shallow clone has several befenits:
    
      - Join upstream development with `git fetch --unshallow`
    
      - Husky install is contained (close #72)
    
      - The distribution can reproduce itself
---
 Makefile | 36 +++++++++++++-----------------------
 1 file changed, 13 insertions(+), 23 deletions(-)

diff --git a/Makefile b/Makefile
index 1d67816..498828b 100644
--- a/Makefile
+++ b/Makefile
@@ -10,20 +10,6 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-# 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]+)?$$' \
@@ -43,9 +29,6 @@ vsn_tag = $(shell git describe --tags --always --first-parent \
 
 annotator_vsn = $(vsn_rel)
 
-endif
-
-
 .PHONY: all
 all: build
 
@@ -71,17 +54,24 @@ else
 
 .PHONY: dist
 dist:
-	@rm -rf apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating
-	@git archive \
-        --output apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
-        --prefix apache-annotator-$(annotator_vsn)-incubating/ \
-        HEAD
+	@rm -rf apache-annotator-$(annotator_vsn)-incubating
+	@git clone \
+        --branch v$(vsn_tag) \
+        --config advice.detachedHead=false \
+        --depth 1 \
+        --quiet \
+        file://"$(shell git rev-parse --show-toplevel)" \
+        apache-annotator-$(annotator_vsn)-incubating
+	@git --git-dir apache-annotator-$(annotator_vsn)-incubating/.git config \
+        remote.origin.url https://github.com/apache/incubator-annotator.git
+	@tar czf \
+        apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
+        apache-annotator-$(annotator_vsn)-incubating
 	@echo "Done: apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz"
 
 endif
 
 .PHONY: distcheck
-distcheck: export HUSKY_SKIP_INSTALL=1
 distcheck: dist
 	@tar xzf apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz
 	@make -C apache-annotator-$(annotator_vsn)-incubating check