pantry/projects/amrdeveloper.github.io/GQL/package.yml

73 lines
2 KiB
YAML
Raw Normal View History

2023-11-27 21:08:05 +03:00
distributable:
url: https://github.com/AmrDeveloper/GQL/archive/refs/tags/{{version}}.tar.gz
strip-components: 1
display-name: gitql
versions:
github: AmrDeveloper/GQL
dependencies:
libgit2.org: ~1.7 # links to libgit2.so.1.7
2023-11-27 21:08:05 +03:00
build:
dependencies:
rust-lang.org: ^1.65
rust-lang.org/cargo: '*'
2023-12-08 18:28:13 +03:00
cmake.org: ^3
2024-05-18 22:58:06 +03:00
script: cargo install --path . --root {{prefix}}
2023-11-27 21:08:05 +03:00
provides:
- bin/gitql
test:
dependencies:
git-scm.org: ^2
2024-06-12 21:15:43 +03:00
gnu.org/sed: '*'
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
2023-11-27 21:08:05 +03:00
script:
- git clone https://github.com/pkgxdev/pkgx
2024-06-12 21:15:43 +03:00
- run: |
echo 'exit' >>$FIXTURE
cat $FIXTURE | gitql --repos pkgx
2023-12-08 18:28:13 +03:00
if: <0.10.0
- run: |
gitql <$FIXTURE
gitql -q 'SELECT 1'
2024-06-12 21:15:43 +03:00
if: '>=0.10.0<0.22.0 || >=0.22.1'
working-directory: pkgx
# bug in v0.22.0, queries without FROM error out, fixed in v0.22.1
- run: |
sed -i '/FROM/!d' $FIXTURE
gitql <$FIXTURE
gitql -q 'SELECT 1 AS just_a_number FROM tags LIMIT 1'
if: 0.22.0
2023-12-08 18:28:13 +03:00
working-directory: pkgx