-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
193 changed files
with
115,493 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
SRC_NAME=jq-1.6 | ||
|
||
CFLAGS += -std=c99 -D_GNU_SOURCE | ||
|
||
all: config_test | ||
$(MAKE) -C $(SRC_NAME) | ||
|
||
config_test: | ||
( if [ -f ./config_done ]; then \ | ||
echo "the same configuration"; \ | ||
else \ | ||
make configure && touch config_done; \ | ||
fi ) | ||
|
||
configure: | ||
( cd $(SRC_NAME) ; \ | ||
./configure \ | ||
--disable-docs \ | ||
--disable-valgrind \ | ||
--without-oniguruma \ | ||
--host=$(HOST_TARGET) \ | ||
--build=$(HOST_BUILD) ; \ | ||
) | ||
|
||
clean: | ||
if [ -f $(SRC_NAME)/Makefile ] ; then \ | ||
$(MAKE) -C $(SRC_NAME) distclean ; \ | ||
fi ; \ | ||
rm -f config_done | ||
|
||
romfs: | ||
$(STRIP) $(SRC_NAME)/jq | ||
$(ROMFSINST) $(SRC_NAME)/jq /usr/sbin/jq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
<!-- | ||
READ THIS FIRST! | ||
If you have a usage question, please ask us on either Stack Overflow (https://stackoverflow.com/questions/tagged/jq) or in the #jq channel (http://irc.lc/freenode/%23jq/) on Freenode (https://webchat.freenode.net/). | ||
--> | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Provide a minimal test case to reproduce the behavior. | ||
If the input is large, either attach it as a file, or [create a gist](https://gist.github.com) and link to it here. | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Environment (please complete the following information):** | ||
- OS and Version: [e.g. macOS, Windows, Linux (please specify distro)] | ||
- jq version [e.g. 1.5] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "modules/oniguruma"] | ||
path = modules/oniguruma | ||
url = https://github.com/kkos/oniguruma.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
sudo: false | ||
|
||
language: c | ||
|
||
stages: | ||
- name: test | ||
|
||
- name: build | ||
# Don't run build stage for pull requests to save time and resources. | ||
if: type != pull_request | ||
|
||
|
||
jobs: | ||
include: | ||
# Build with gcc and run tests on Ubuntu. | ||
- &test-ubuntu | ||
stage: test | ||
os: linux | ||
compiler: gcc | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- valgrind | ||
- bison | ||
- automake | ||
|
||
before_install: | ||
- uname -s | ||
- rvm install ruby-1.9.3-p551 | ||
- rvm use 1.9.3 | ||
- rm src/{lexer,parser}.{c,h} | ||
- sed -i.bak '/^AM_INIT_AUTOMAKE(\[-Wno-portability 1\.14\])$/s/14/11/' modules/oniguruma/configure.ac | ||
|
||
install: | ||
- bundle install --gemfile=docs/Gemfile | ||
- wget http://ftp.debian.org/debian/pool/main/b/bison/bison_3.0.2.dfsg-2_amd64.deb | ||
- ar p bison_3.0.2.dfsg-2_amd64.deb data.tar.xz | tar xJ | ||
- if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi | ||
|
||
before_script: | ||
# If this is OS X we'll get bison from brew, else we'll get bison | ||
# from the .deb unpacked above in the install section. | ||
- PATH=/usr/local/opt/bison/bin:$PWD/usr/bin:$PATH | ||
- echo SHELL=$SHELL | ||
- echo PATH=$PATH | ||
- which bison | ||
- bison --version | ||
- autoreconf -if | ||
- ./configure --with-oniguruma=builtin YACC="$(which bison) -y" $COVERAGE | ||
|
||
script: | ||
# When using the bison from Debian we need to tell that bison where | ||
# to find its data. Yay non-relocatable code. Not. | ||
- echo PATH=$PATH | ||
- which bison | ||
- make BISON_PKGDATADIR=$PWD/usr/share/bison src/parser.c || make src/parser.c | ||
# Make dist! | ||
# | ||
# Make it first to fail the build early, before we test with | ||
# valgrind. | ||
- make dist | ||
# Build and test the dist (without valgrind) | ||
- | | ||
( | ||
tar xvf jq-`scripts/version`.tar.gz && | ||
cd jq-`scripts/version` && | ||
pwd && | ||
./configure --disable-valgrind --with-oniguruma=builtin YACC="$(which bison) -y" $COVERAGE && | ||
make BISON_PKGDATADIR=$PWD/usr/share/bison src/parser.c || make src/parser.c && | ||
make -j4 && | ||
make check -j4 || true | ||
) | ||
# Build and test the HEAD | ||
- make -j4 | ||
- make check -j4 | ||
|
||
after_failure: | ||
- cat test-suite.log | ||
- cat tests/*.log | ||
|
||
|
||
# Build with clang and run tests on Ubuntu. | ||
- <<: *test-ubuntu | ||
compiler: clang | ||
|
||
|
||
# Build with gcc and run tests with gcov on Ubuntu. | ||
- <<: *test-ubuntu | ||
env: COVERAGE="--disable-valgrind --enable-gcov" | ||
|
||
after_script: | ||
- rm -rf src/.libs # don't care about coverage for libjq | ||
- coveralls --gcov-options '\-lp' | ||
-e src/lexer.c -e src/parser.c -e src/jv_dtoa.c | ||
|
||
|
||
# Build with gcc and run tests on macOS. | ||
- &test-osx | ||
<<: *test-ubuntu | ||
os: osx | ||
|
||
before_install: | ||
- uname -s | ||
- brew update | ||
- brew install flex bison | ||
- rvm install ruby-1.9.3-p551 | ||
- rvm use 1.9.3 | ||
- gem install bundler | ||
- rm src/{lexer,parser}.{c,h} | ||
- sed -i.bak '/^AM_INIT_AUTOMAKE(\[-Wno-portability 1\.14\])$/s/14/11/' modules/oniguruma/configure.ac | ||
|
||
install: | ||
- bundle install --gemfile=docs/Gemfile | ||
- if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi | ||
|
||
|
||
# Build with clang and run tests on macOS. | ||
- <<: *test-osx | ||
compiler: clang | ||
|
||
|
||
# Build with gcc and run tests on Alpine Linux v3.7 (inside chroot). | ||
# Note: Alpine uses musl libc. | ||
- &test-alpine | ||
stage: test | ||
os: linux | ||
language: minimal | ||
compiler: gcc | ||
sudo: true | ||
|
||
before_install: | ||
- "wget 'https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.7.0/alpine-chroot-install' \ | ||
&& echo '090d323d887ef3a2fd4e752428553f22a52b87bb alpine-chroot-install' | sha1sum -c || travis_terminate 1" | ||
- alpine() { /alpine/enter-chroot -u "$USER" "$@"; } | ||
|
||
install: | ||
- sudo sh alpine-chroot-install -b v3.7 -a "$ARCH" | ||
-p 'build-base automake autoconf bison libtool oniguruma-dev' | ||
|
||
before_script: | ||
- autoreconf -if | ||
|
||
script: | ||
- alpine ./configure --disable-docs | ||
- alpine make | ||
- alpine make check | ||
|
||
|
||
# Build release binary statically linked with musl libc on Alpine Linux | ||
# (inside chroot). If building a tagged commit, then deploy release | ||
# tarball to GitHub Releases. | ||
- &build-alpine | ||
<<: *test-alpine | ||
stage: build | ||
env: ARCH=x86_64 | ||
|
||
script: | ||
- alpine ./configure --disable-docs --enable-all-static | ||
CFLAGS='-Os -static -no-pie' CXXFLAGS='-Os -static -no-pie' | ||
- alpine make | ||
- alpine strip jq | ||
|
||
- jq -V | ||
- ls -lah jq | ||
- file jq | ||
# Ensure that the built executable is really statically linked. | ||
- file jq | grep -Fw 'statically linked' | ||
|
||
before_deploy: | ||
- PKGNAME="jq-$TRAVIS_TAG-$ARCH-linux" | ||
- mkdir $PKGNAME && mv jq $PKGNAME/ | ||
- tar -czf $PKGNAME.tar.gz $PKGNAME/ | ||
- sha256sum $PKGNAME.tar.gz > $PKGNAME.tar.gz.sha256 | ||
|
||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: # TODO: put encrypted GitHub token here! | ||
file: jq-$TRAVIS_TAG-*.tar.gz* | ||
file_glob: true | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
|
||
# Build binaries for other architectures using QEMU user-mode emulation. | ||
- <<: *build-alpine | ||
env: ARCH=x86 | ||
|
||
- <<: *build-alpine | ||
env: ARCH=aarch64 | ||
|
||
- <<: *build-alpine | ||
env: ARCH=armhf | ||
|
||
- <<: *build-alpine | ||
env: ARCH=ppc64le | ||
|
||
|
||
notifications: | ||
email: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
Created By: | ||
Stephen Dolan <[email protected]> | ||
|
||
Maintained by: | ||
Nicolas Williams <[email protected]> | ||
William Langford <[email protected]> | ||
|
||
Contributions by: | ||
Aaron Peschel <[email protected]> | ||
Adam Lindberg <[email protected]> | ||
Alex Chamberlain <[email protected]> | ||
Andrew O'Brien <[email protected]> - docs build | ||
Andrew Rodland <[email protected]> - bug fixes | ||
Ankur <[email protected]> - bug fixes | ||
Anthony Shortland <[email protected]> - rpmbuild target | ||
Assaf Gordon <[email protected]> - error handling | ||
Brendan Macmillan <[email protected]> - bug fixes, load library from ~/.jq | ||
cdnbacon <[email protected]> | ||
Charles Merriam <[email protected]> | ||
Colin von Heuring <[email protected]> | ||
Damian Gryski <[email protected]> | ||
David Fetter <[email protected]> - added --rawfile | ||
David Haguenauer <[email protected]> | ||
David R. MacIver <[email protected]> - bug fixes | ||
David Tolnay <[email protected]> - destructuring, build improvements | ||
Doug Luce <[email protected]> - build | ||
Eiichi Sato <[email protected]> | ||
Eric Bréchemier <[email protected]> - bug fix | ||
Filippo Giunchedi <[email protected]> - bug fixes | ||
Filippo Valsorda <[email protected]> - recursive object merge (`*`) | ||
Hanfei Shen <[email protected]> | ||
i <[email protected]> | ||
Ian Miell <[email protected]> | ||
Jack Pearkes <[email protected]> - update tutorial | ||
James Andariese <[email protected]> - Dockerfile | ||
Jingwen Owen Ou <[email protected]> - jqplay.org and link to it | ||
jkleint <[email protected]> | ||
Joe Littlejohn <[email protected]> - bug fixes | ||
Joel Purra <[email protected]> | ||
Juan Guerrero <[email protected]> - bug fixes | ||
Kenny Shen <[email protected]> - doc fixes | ||
Kim De Mey <[email protected]> - build | ||
Kim Toms <[email protected]> | ||
LCD 47 <[email protected]> | ||
Lee Thompson <[email protected]> - autoconf stuff, rpm | ||
Marc Abramowitz <[email protected]> | ||
Marc Bruggmann <[email protected]> | ||
Markus Lanthaler <[email protected]> - doc fixes | ||
Maxime Biais <[email protected]> - build | ||
Michael Daines <[email protected]> - add sqrt; doc fixes | ||
Mike Fletcher <[email protected]> | ||
Mike McCabe <[email protected]> - math (libm) functions | ||
Nicolas Pouillard <[email protected]> - add tests | ||
Nicolas Williams <[email protected]> - library-fication, autoconf stuff, exception handling, various | ||
Peter van Dijk <[email protected]> - doc fixes | ||
Philipp Hagemeister <[email protected]> - doc fixes | ||
pkoppstein <[email protected]> - various builtins, improvements | ||
polyester <[email protected]> - automake version update | ||
Ryoichi KATO <[email protected]> - doc fixes | ||
Rémy Léone <[email protected]> - add .travis.yml | ||
Santiago Lapresta <[email protected]> - join, arrays, all, any, other filters | ||
Sebastian Freundt <[email protected]> - build | ||
Shaun Guth <[email protected]> - base64d | ||
Shay Elkin <[email protected]> | ||
Simon Elsbrock <[email protected]> - Debian | ||
Stefan Seemayer <[email protected]> | ||
Stephen Roantree <[email protected]> | ||
Stephen Shaw <[email protected]> | ||
Steven Maude <[email protected]> | ||
Steven Penny <[email protected]> - Windows bug fixes | ||
[email protected] <[email protected]> | ||
Travis Gockel <[email protected]> | ||
Zhiming Wang <[email protected]> | ||
13ren <[email protected]> |
Oops, something went wrong.