Merge branch 'dev' of gitlab.com:ligolang/ligo into rinderknecht@fix_endif

This commit is contained in:
Christian Rinderknecht 2020-05-15 21:24:57 +02:00
commit 1c9240703c
6 changed files with 14024 additions and 4976 deletions

View File

@ -17,6 +17,7 @@ stages:
- ide-deploy
- nix
- nix-push
- versioning
# TODO provide sensible CI for master
dont-merge-to-master:
@ -99,6 +100,13 @@ dont-merge-to-master:
- eval $(opam config env)
- scripts/setup_repos.sh
version_scheduled_job:
stage: versioning
script:
- scripts/versioning.sh
only:
- schedules
local-dune-job:
<<: *before_script
stage: test
@ -113,6 +121,8 @@ local-dune-job:
only:
- merge_requests
- dev
- tags
- triggers
- /^.*-run-dev$/
# Run a docker build without publishing to the registry
@ -158,6 +168,7 @@ build-and-package-debian-9:
<<: *build_binary
only:
- dev
- tags
- /^.*-run-dev$/
build-and-package-debian-10:
@ -175,6 +186,7 @@ build-and-package-debian-10:
only:
- merge_requests
- dev
- tags
- /^.*-run-dev$/
build-and-package-ubuntu-18-04:
@ -188,6 +200,7 @@ build-and-package-ubuntu-18-04:
<<: *build_binary
only:
- dev
- tags
- /^.*-run-dev$/
build-and-package-ubuntu-19-10:
@ -201,6 +214,7 @@ build-and-package-ubuntu-19-10:
<<: *build_binary
only:
- dev
- tags
- /^.*-run-dev$/
# Pages are deployed from dev, be careful not to override 'next'
@ -232,7 +246,8 @@ run-webide-unit-tests:
- npm ci
- export LIGO_CMD=/bin/ligo && npm run test
rules:
- changes:
- if: '$TAG_JOB != "true"'
changes:
- tools/webide/**
when: always
@ -256,10 +271,11 @@ build-publish-ide-image:
.
- docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
rules:
- changes:
- if: '$TAG_JOB != "true"'
changes:
- tools/webide/**
when: always
- if: '$CI_COMMIT_REF_NAME == "dev"'
if: '$CI_COMMIT_REF_NAME == "dev"'
when: always
run-webide-e2e-tests:
@ -271,10 +287,11 @@ run-webide-e2e-tests:
- export WEBIDE_IMAGE="${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
- docker-compose run e2e
rules:
- changes:
- if: '$TAG_JOB != "true"'
changes:
- tools/webide/**
when: always
- if: '$CI_COMMIT_REF_NAME == "dev"'
if: '$CI_COMMIT_REF_NAME == "dev"'
when: always
deploy-handoff:

File diff suppressed because it is too large Load Diff

View File

@ -17,10 +17,10 @@
"homepage": "",
"owner": "serokell",
"repo": "nix-npm-buildpackage",
"rev": "14d03b37cd421b281835ae245b6cbf5b84c26e80",
"sha256": "13lz138rcy2vfd13sa4l2r4y5nx7v5pslxfy1vdq2phpmnn9j9yb",
"rev": "0450c7d88dc3d0a26461b05cfa36f45d551f4d63",
"sha256": "1w0k4jxw141win67rk66nvg323j5i3s4m1w3icf1g1f0p2zyf531",
"type": "tarball",
"url": "https://github.com/serokell/nix-npm-buildpackage/archive/14d03b37cd421b281835ae245b6cbf5b84c26e80.tar.gz",
"url": "https://github.com/serokell/nix-npm-buildpackage/archive/0450c7d88dc3d0a26461b05cfa36f45d551f4d63.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {

45
scripts/versioning.sh Executable file
View File

@ -0,0 +1,45 @@
#!/bin/sh
apt-get update -qq
apt-get -y -qq install jq
fetch_version () {
local LAST_VERSION=`curl --silent "https://gitlab.com/api/v4/projects/12294987/repository/tags?search=^V&order_by=name" | jq "map(.name)[0]"`
MAJOR=`echo $LAST_VERSION | sed -E "s/\.|\"|\V/\n/g" | grep -e . | sed -n 1p`
MINOR=`echo $LAST_VERSION | sed -E "s/\.|\"|\V/\n/g" | grep -e . | sed -n 2p`
PATCH=`echo $LAST_VERSION | sed -E "s/\.|\"|\V/\n/g" | grep -e . | sed -n 3p`
}
increment_patch () {
fetch_version
local NEW_PATCH=$((PATCH+1))
NEW_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}"
}
increment_minor () {
fetch_version
local NEW_MINOR=$((MINOR+1))
NEW_VERSION="${MAJOR}.${NEW_MINOR}.0"
}
increment_major () {
fetch_version
local NEW_MAJOR=$((MAJOR+1))
NEW_VERSION="${NEW_MAJOR}.0.0"
}
tag_dev () {
curl --request POST --header "PRIVATE-TOKEN: ${AUTH}" https://gitlab.com/api/v4/projects/12294987/repository/tags -d "tag_name=V.${1}&ref=dev"
}
increment_minor
echo $NEW_VERSION
# increment_major
# echo $NEW_VERSION
# increment_patch
# echo $NEW_VERSION
tag_dev $NEW_VERSION
# curl --header "PRIVATE-TOKEN: W-7UVDzeofRmejE17_Gn" https://gitlab.com/api/v4/version
# curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/repository/branches?branch=newbranch&ref=master

View File

@ -496,6 +496,7 @@ rule scan state = parse
and file = Lexing.(lexbuf.lex_curr_p.pos_fname) in
let base = Filename.basename file
and reg, incl_file = scan_inclusion state lexbuf in
if state.mode = Copy then
let incl_dir = Filename.dirname incl_file in
let path = mk_path state in
let incl_path, incl_chan =
@ -514,8 +515,9 @@ rule scan state = parse
let state = {state with env=state'.env; incl=state'.incl} in
let path = if path = "" then base
else path ^ Filename.dir_sep ^ base in
print state (sprintf "\n# %i \"%s\" 2" (line+1) path);
scan state lexbuf
let () = print state (sprintf "\n# %i \"%s\" 2" (line+1) path)
in scan state lexbuf
else scan state lexbuf
| "if" ->
let mode = expr state lexbuf in
let mode = if state.mode = Copy then mode else Skip in