1010# License for the specific language governing permissions and limitations under
1111# the License.
1212
13- # Determine the version identifier from lerna.json or git.
14-
15- # Are we in a release?
16- in_release = $(shell if [ ! -d .git ]; then echo true; fi)
17-
18- ifeq ($(in_release ) , true)
19-
20- # Get the version information from lerna.json.
21- annotator_vsn = $(shell jq -r .version < lerna.json)
22-
23- else
24-
25- # Get the version information from git.
26-
2713# What is the prerelease version?
2814vsn_pre = $(shell git describe --tags --always --first-parent \
2915 | grep -Eo -- '(-rc\.[0-9]+) ?$$' \
@@ -43,9 +29,6 @@ vsn_tag = $(shell git describe --tags --always --first-parent \
4329
4430annotator_vsn = $(vsn_rel )
4531
46- endif
47-
48-
4932.PHONY : all
5033all : build
5134
7154
7255.PHONY : dist
7356dist :
74- @rm -rf apache-annotator-$(annotator_vsn )$(vsn_pre ) -incubating
75- @git archive \
76- --output apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
77- --prefix apache-annotator-$(annotator_vsn)-incubating/ \
78- HEAD
57+ @rm -rf apache-annotator-$(annotator_vsn ) -incubating
58+ @git clone \
59+ --branch v$(vsn_tag) \
60+ --config advice.detachedHead=false \
61+ --depth 1 \
62+ --quiet \
63+ file ://"$(shell git rev-parse --show-toplevel) " \
64+ apache-annotator-$(annotator_vsn)-incubating
65+ @git --git-dir apache-annotator-$(annotator_vsn)-incubating/.git config \
66+ remote.origin.url https ://github.com/apache/incubator-annotator.git
67+ @tar czf \
68+ apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
69+ apache-annotator-$(annotator_vsn)-incubating
7970 @echo "Done: apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz"
8071
8172endif
8273
8374.PHONY : distcheck
84- distcheck : export HUSKY_SKIP_INSTALL=1
8575distcheck : dist
8676 @tar xzf apache-annotator-$(annotator_vsn )$(vsn_pre ) -incubating.tar.gz
8777 @make -C apache-annotator-$(annotator_vsn ) -incubating check
0 commit comments