UNPKG

@stordata/grammars

Version:

A collection of ANTLR grammars used at Stordata. This project exists so that we can package the grammars (and various utilities) as a CommonJS module. The `antlr4` Javascript runtime is only available as an ES module at the time of writing.

50 lines (45 loc) 944 B
image: docker.stordata.fr/stordata/docker-node:24 stages: - antlr - build - release antlr: stage: antlr image: docker.stordata.fr/stordata/docker-antlr tags: - docker script: - antlr4 -Dlanguage=JavaScript -visitor -o generated src/grammars/{CustomMetric,CSV,PrometheusMetrics}.g4 artifacts: expire_in: 1h paths: - generated/ build: stage: build tags: - docker dependencies: - antlr script: - npm ci - npm run lint - npm test - npm run build artifacts: expire_in: 1h paths: - dist/ release: stage: release tags: - docker dependencies: - antlr - build script: - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc - sed -i "s/\"version\":\s\"\(.*\..*\)\.\(.*\)\"/\"version\":\"\1.$(date +%Y%m%d%H%M%S)\"/" package.json - npm publish - git checkout . rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH