fix(gitql)

closes #4347
This commit is contained in:
Jacob Heider 2023-12-08 10:28:13 -05:00 committed by Jacob Heider
parent 9b0b490b91
commit 6916ed4b3a

View file

@ -14,6 +14,7 @@ build:
dependencies: dependencies:
rust-lang.org: ^1.65 rust-lang.org: ^1.65
rust-lang.org/cargo: '*' rust-lang.org/cargo: '*'
cmake.org: ^3
script: cargo install --locked --path . --root {{prefix}} script: cargo install --locked --path . --root {{prefix}}
provides: provides:
@ -22,35 +23,69 @@ provides:
test: test:
dependencies: dependencies:
git-scm.org: ^2 git-scm.org: ^2
fixture: |
SELECT 1
SELECT 1 + 2
SELECT LEN("Git Query Language")
SELECT "One" IN ("One", "Two", "Three")
SELECT "Git Query Language" LIKE "%Query%"
SELECT DISTINCT title AS tt message FROM commits
SELECT name, COUNT(name) AS commit_num FROM commits GROUP BY name ORDER BY commit_num DESC LIMIT 10
SELECT commit_count FROM branches WHERE commit_count BETWEEN 0 .. 10
SELECT * FROM refs WHERE type = "branch"
SELECT * FROM refs ORDER BY type
SELECT * FROM commits
SELECT name, email FROM commits
SELECT name, email FROM commits ORDER BY name DESC, email ASC
SELECT name, email FROM commits WHERE name LIKE "%gmail%" ORDER BY name
SELECT * FROM commits WHERE LOWER(name) = "mxcl"
SELECT name FROM commits GROUP By name
SELECT name FROM commits GROUP By name having name = "mxcl"
SELECT * FROM branches
SELECT * FROM branches WHERE is_head = true
SELECT name, LEN(name) FROM branches
SELECT * FROM tags
SELECT * FROM tags OFFSET 1 LIMIT 1
exit
script: script:
- git clone https://github.com/pkgxdev/pkgx - git clone https://github.com/pkgxdev/pkgx
- cat $FIXTURE | gitql --repos pkgx - run: cat $FIXTURE | gitql --repos pkgx
fixture: |
SELECT 1
SELECT 1 + 2
SELECT LEN("Git Query Language")
SELECT "One" IN ("One", "Two", "Three")
SELECT "Git Query Language" LIKE "%Query%"
SELECT DISTINCT title AS tt message FROM commits
SELECT name, COUNT(name) AS commit_num FROM commits GROUP BY name ORDER BY commit_num DESC LIMIT 10
SELECT commit_count FROM branches WHERE commit_count BETWEEN 0 .. 10
SELECT * FROM refs WHERE type = "branch"
SELECT * FROM refs ORDER BY type
SELECT * FROM commits
SELECT name, email FROM commits
SELECT name, email FROM commits ORDER BY name DESC, email ASC
SELECT name, email FROM commits WHERE name LIKE "%gmail%" ORDER BY name
SELECT * FROM commits WHERE LOWER(name) = "mxcl"
SELECT name FROM commits GROUP By name
SELECT name FROM commits GROUP By name having name = "mxcl"
SELECT * FROM branches
SELECT * FROM branches WHERE is_head = true
SELECT name, LEN(name) FROM branches
SELECT * FROM tags
SELECT * FROM tags OFFSET 1 LIMIT 1
exit
if: <0.10.0
- run: |
gitql <$FIXTURE
gitql -q 'SELECT 1'
fixture: |
SELECT 1
SELECT 1 + 2
SELECT LEN("Git Query Language")
SELECT "One" IN ("One", "Two", "Three")
SELECT "Git Query Language" LIKE "%Query%"
SELECT DISTINCT title AS tt message FROM commits
SELECT name, COUNT(name) AS commit_num FROM commits GROUP BY name ORDER BY commit_num DESC LIMIT 10
SELECT commit_count FROM branches WHERE commit_count BETWEEN 0 .. 10
SELECT * FROM refs WHERE type = "branch"
SELECT * FROM refs ORDER BY type
SELECT * FROM commits
SELECT name, email FROM commits
SELECT name, email FROM commits ORDER BY name DESC, email ASC
SELECT name, email FROM commits WHERE name LIKE "%gmail%" ORDER BY name
SELECT * FROM commits WHERE LOWER(name) = "mxcl"
SELECT name FROM commits GROUP By name
SELECT name FROM commits GROUP By name having name = "mxcl"
SELECT * FROM branches
SELECT * FROM branches WHERE is_head = true
SELECT name, LEN(name) FROM branches
SELECT * FROM tags
SELECT * FROM tags OFFSET 1 LIMIT 1
if: '>=0.10.0'
working-directory: pkgx