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:09:49 UTC
[incubator-annotator] branch clone-dist created (now 938fc5f)
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.
at 938fc5f Make dist by creating a shallow clone
This branch includes the following new commits:
new c6beefd Extract husky configuration
new ac96d21 Only redefine dist based on tag presence
new 938fc5f Make dist by creating a shallow clone
The 3 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.
[incubator-annotator] 01/03: Extract husky configuration
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 c6beefdbf8aa3bb54a8748476417a9f1ca715baa
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Thu Apr 2 19:14:18 2020 -0700
Extract husky configuration
---
.eslintrc.js | 1 +
husky.config.js | 6 ++++++
package.json | 5 -----
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index 51592fb..1e51508 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -64,6 +64,7 @@ module.exports = {
'.eslintrc.js',
'.mocharc.js',
'babel.config.js',
+ 'husky.config.js',
'nyc.config.js',
],
env: {
diff --git a/husky.config.js b/husky.config.js
new file mode 100644
index 0000000..e4eb0ab
--- /dev/null
+++ b/husky.config.js
@@ -0,0 +1,6 @@
+module.exports = {
+ hooks: {
+ 'pre-commit': 'lint-staged',
+ },
+ skipCI: true,
+};
diff --git a/package.json b/package.json
index 6c493d7..1ed4a05 100644
--- a/package.json
+++ b/package.json
@@ -30,11 +30,6 @@
"web:build": "webpack --config=web/webpack.config.js --mode development",
"web:server": "webpack-dev-server --config=web/webpack.config.js --hot --mode development"
},
- "husky": {
- "hooks": {
- "pre-commit": "lint-staged"
- }
- },
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.8.7",
[incubator-annotator] 03/03: Make dist by creating a shallow 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 938fc5f857ad3cdfd5cba60ff8903cdd205ac047
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Mon May 4 20:54:07 2020 -0700
Make dist by creating a shallow clone
Create a distribution 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
[incubator-annotator] 02/03: Only redefine dist based on tag
presence
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 ac96d214f20691d554173cf20879a36b5648679e
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Mon May 4 22:07:38 2020 -0700
Only redefine dist based on tag presence
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 49afddd..1d67816 100644
--- a/Makefile
+++ b/Makefile
@@ -64,7 +64,7 @@ check: build
ifeq ($(vsn_tag),)
.PHONY: dist
-dist distcheck:
+dist:
$(error No tag found for release)
else
@@ -78,6 +78,8 @@ dist:
HEAD
@echo "Done: apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz"
+endif
+
.PHONY: distcheck
distcheck: export HUSKY_SKIP_INSTALL=1
distcheck: dist
@@ -91,5 +93,3 @@ distsign: dist
> 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
-
-endif