Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# The files below are development infrastructure, they are excluded
# from source archives created by "git archive", see misc/GNUmakefile.

/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/AGENTS.md export-ignore
/CLAUDE.md export-ignore
/docs/agent export-ignore
/misc export-ignore
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules/
package-lock.json
/build/
/Makefile
/njs-*.tar.gz
/njs-*.tar.gz.sha256
4 changes: 0 additions & 4 deletions .hgignore

This file was deleted.

69 changes: 0 additions & 69 deletions .hgtags

This file was deleted.

11 changes: 3 additions & 8 deletions auto/make
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,6 @@ benchmark: $NJS_BUILD_DIR/njs_auto_config.h \\
$NJS_BUILD_DIR/njs_benchmark

$NJS_BUILD_DIR/njs_benchmark

dist:
rm -rf njs-\$(NJS_VER) \\
&& hg archive njs-\$(NJS_VER).tar.gz \\
-p njs-\$(NJS_VER) \\
-X ".hg*" \\
&& echo njs-\$(NJS_VER).tar.gz done
END

if [ $NJS_HAVE_QUICKJS = YES ]; then
Expand Down Expand Up @@ -372,7 +365,9 @@ $NJS_BUILD_DIR/ts/node_modules: $NJS_BUILD_DIR/ts/package.json
touch $NJS_BUILD_DIR/ts/node_modules

$NJS_BUILD_DIR/njs-types-\$(NJS_TYPES_VER).tgz: $NJS_BUILD_DIR/ts/package.json
hg id -i > $NJS_BUILD_DIR/ts/COMMITHASH || true
git ls-files --error-unmatch ts/package.json > /dev/null 2>&1 \\
&& git rev-parse --short HEAD > $NJS_BUILD_DIR/ts/COMMITHASH \\
|| true
cd $NJS_BUILD_DIR && \$(NPM) pack ./ts

.PHONY: ts
Expand Down
35 changes: 35 additions & 0 deletions misc/GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

VER = $(shell grep 'define NJS_VERSION ' src/njs.h \
| sed -e 's/^.*"\(.*\)".*/\1/')
NJS = njs-$(VER)
TARBALL = $(NJS).tar.gz


release:
git archive --format=tar.gz --prefix=$(NJS)/ -o $(TARBALL) HEAD

sha256sum $(TARBALL) > $(TARBALL).sha256

@echo "excluded from $(TARBALL):"
@{ git ls-tree -r --name-only HEAD; \
tar -t -z -f $(TARBALL) | grep -v "/$$" \
| sed -e "s|^$(NJS)/||"; } \
| sort | uniq -u


# Builds the extracted tarball in a temporary directory, which is kept
# around on failure.

release-check:
@dir=`mktemp -d`; \
echo "extracting $(TARBALL) into $$dir"; \
tar -x -z -f $(TARBALL) -C $$dir \
&& cd $$dir/$(NJS) \
&& ./configure \
&& $(MAKE) njs \
&& $(MAKE) unit_test \
&& rm -rf $$dir \
&& echo "$(TARBALL) builds"


.PHONY: release release-check
1 change: 0 additions & 1 deletion ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,3 @@ It's the same strategy as used in [DefinitelyTyped](https://github.com/Definitel
The reason is that npmjs enforces [SemVer](https://semver.org/) which doesn't allow four-part version number nor provide post-release suffixes.

You can find from which commit the package was built in file `COMMITHASH` inside the published package.
It contains global revision id in the upstream repository https://hg.nginx.org/njs/ (Mercurial).
Loading