From c309efaea5f0de7eb8c42bf8c99da401c4e59f97 Mon Sep 17 00:00:00 2001 From: zapashcanon Date: Sat, 23 Nov 2019 07:32:46 +0100 Subject: [PATCH] first release --- .build.yml | 34 ++++++++++++++++++++++++++++++++-- CHANGES.md | 3 +++ dune-project | 32 ++++++++++++++++++++++++++++++++ opazl.opam | 38 +++++++++++++++++++++++--------------- 4 files changed, 90 insertions(+), 17 deletions(-) create mode 100644 CHANGES.md diff --git a/.build.yml b/.build.yml index 0fc1e20..2aef6d5 100644 --- a/.build.yml +++ b/.build.yml @@ -2,6 +2,7 @@ image: debian/unstable packages: - opam - ocaml + - curl sources: - https://git.zapashcanon.fr/zapashcanon/opazl environment: @@ -13,6 +14,9 @@ environment: archive_dst: /var/www/fs.zapashcanon.fr/archive secrets: - ec1f49cd-38dc-41d9-89f4-c3b6ecd7bcad # ssh deploy key + - b5b0e36c-fe52-43c4-9103-0aa918ad175c # github token + - c9e55d80-7b6a-4ad4-81bd-921d2c3247b8 # dune release profile + - ff8575b8-7192-4e0c-9905-6d04142a4ec1 # git config tasks: - setup: | opam init -y @@ -48,6 +52,32 @@ tasks: cd $name eval "$(opam env)" dune clean - git archive -o ${name}-dev.tar.xz HEAD + archive_name=${name}-dev.tar.xz + git archive -o $archive_name HEAD ssh $sshopts $deploy "mkdir -p $archive_dst/$name/" - scp $sshopts ${name}-dev.tar.xz $deploy:$archive_dst/$name/ + scp $sshopts $archive_name $deploy:$archive_dst/$name/ + rm $archive_name + - release: | + cd $name + eval "$(opam env)" + git describe --exact-match || exit 0 + opam install -y dune-release + tag=$(git describe --exact-match) + dune-release distrib || true + archive_name=${name}-${tag}.tbz + ls _build/${archive_name} + scp $sshopts _build/${archive_name} $deploy:$archive_dst/$name/ + url="https://fs.zapashcanon.fr/archive/${name}/${archive_name}" + echo $url > _build/${name}-${tag}.url + dune-release opam pkg + opam_file=_build/${name}.${tag}/opam + line_num="$(grep -n -e 'src:' $opam_file | cut -d: -f1)" + sed -i -e "${line_num}s|^.*| src: \"${url}\"|" $opam_file + line_num=$(($line_num + 1)) + sed -i -e "${line_num}d" $opam_file + sed -i -e "${line_num}d" $opam_file + cd .. + echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config + git clone https://github.com/Cameleo/opam-repository.git + cd $name + dune-release opam submit --no-auto-open -y diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..976aaf8 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,3 @@ +## 0.0.1 - 2019-11-23 + +First release diff --git a/dune-project b/dune-project index e3bcd32..51ad3ab 100644 --- a/dune-project +++ b/dune-project @@ -2,4 +2,36 @@ (name opazl) +(license ISC) + +(authors "Léo Andrès ") + +(maintainers "Léo Andrès ") + +(source + (uri git://git.zapashcanon.fr/zapashcanon/opazl.git)) + +(bug_reports https://git.zapashcanon.fr/zapashcanon/opazl/issues) + +(homepage https://git.zapashcanon.fr/zapashcanon/opazl) + +(documentation https://doc.zapashcanon.fr/opazl/) + +(generate_opam_files true) + (explicit_js_mode) + +(package + (name opazl) + (synopsis "Library to parse ZNC logs") + (description + "opazl is an OCaml library to parse ZNC logs. It can parse a log file encoded in utf-8, allows you to access time, user and content for each message and more.") + (depends + (ocaml + (>= 4.05.0)) + (dune + (>= 1.11.0)) + (bisect_ppx + (>= 1.4.1)) + (sedlex + (>= 2.1)))) diff --git a/opazl.opam b/opazl.opam index 6501d2d..03dd035 100644 --- a/opazl.opam +++ b/opazl.opam @@ -1,24 +1,32 @@ +# This file is generated by dune, edit dune-project instead opam-version: "2.0" - -synopsis: "ZNC logs parser" - -version: "dev" +synopsis: "Library to parse ZNC logs" +description: + "opazl is an OCaml library to parse ZNC logs. It can parse a log file encoded in utf-8, allows you to access time, user and content for each message and more." +maintainer: ["Léo Andrès "] +authors: ["Léo Andrès "] license: "ISC" homepage: "https://git.zapashcanon.fr/zapashcanon/opazl" +doc: "https://doc.zapashcanon.fr/opazl/" bug-reports: "https://git.zapashcanon.fr/zapashcanon/opazl/issues" - -authors: "Léo Andrès (zapashcanon) " -maintainer: "Léo Andrès (zapashcanon) " -dev-repo: "git+https://git.zapashcanon.fr/zapashcanon/opazl.git" - depends: [ - "ocaml" + "ocaml" {>= "4.05.0"} "dune" {>= "1.11.0"} - "sedlex" + "bisect_ppx" {>= "1.4.1"} + "sedlex" {>= "2.1"} ] - build: [ - ["dune" "build" "-p" name "-j" jobs] + ["dune" "subst"] {pinned} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] ] - -description: "ZNC logs parser." +dev-repo: "git://git.zapashcanon.fr/zapashcanon/opazl.git"