Skip to content
Snippets Groups Projects
Commit 615ffc50 authored by erwan's avatar erwan
Browse files

Build: now use a custom bash script to build opam packages

parent 9beabcb2
No related branches found
No related tags found
No related merge requests found
Pipeline #18263 passed with warnings
#######################################################################################
# Workflow:
# C=make cia ; A=make amend ; U=make uv ; P=make opam-rel
# - to make sure the sha and the version are good, one should never
# do U and then A.
# - to make sure gtit is not confused, one should never do A and the P
#
# therefore, to avoid such problems, legal trace are defined by this automata:
# 0 -C-> 1
# 1 -A-> 1
# 1 -P-> 2
# 2 -U-> 0
# 1 -U-> 0
# to implement such a workflow, C puts a lock (state 1) and U removes it (state 0)
###############################
# typical workflow:
# uv -> cia -> amend* -> push ->
# wait for gitlab release job -> pull (to get the release tag)
# and then; optionnaly, to release an opam version:
# opam-rel
......@@ -78,51 +100,12 @@ amend:
# opam-ing
NAME=lustre-v6
PACKNAME=$(NAME).$(PRE_VERSION)
WWW=/import/www/DIST-TOOLS/SYNCHRONE
HTTP=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE
# for testing opam packages before publishing
WWWTEST=/import/www/DIST-TOOLS/SYNCHRONE/test
HTTPTEST=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/test
OPAM_FILE=$(shell find $(WWW)/opam-repository/packages -name opam | grep lustre | sort | tail -1 | sed -e 's/^./\U&/')
OPAM_FILE_TEST=$(shell find $(WWW)/test/opam-repository/packages -name opam | grep lustre | sort | tail -1 | sed -e 's/^./\U&/')
OPAM_DIR=$(shell dirname $(OPAM_FILE))
OFFICIAL_OPAM_DIR=/home/jahier/local/opam-repository/packages/lustre-v6
$(PACKNAME).tgz:
git archive --prefix=$(PACKNAME)/ -o $(PACKNAME).tgz HEAD
$(WWW)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
cp $^ $@
$(WWWTEST)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
cp $^ $@
opam : $(WWW)/pool/$(PACKNAME).tgz
[ "$(BRANCH)" = "master" ] && ( \
cd $(WWW)/opam-repository/packages && \
oasis2opam $(HTTP)/pool/$(PACKNAME).tgz && \
cp ~/lus2lic/opam $(OPAM_FILE) && \
cd .. ; opam-admin check && opam-admin make -g \
) || echo "*** I won't make an opam package\n*** until you commit something!" && \
echo 'post-messages: ["A more up-to-date version can be obtained from (opam repo add) http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository/ "]' >> $(OPAM_FILE) && \
cp -rf $(OPAM_DIR) $(OFFICIAL_OPAM_DIR)
opam-test : $(WWWTEST)/pool/$(PACKNAME).tgz
[ "$(BRANCH)" = "master" ] && cd $(WWWTEST)/opam-repository/packages && \
oasis2opam $(HTTPTEST)/pool/$(PACKNAME).tgz && \
cp $(OPAM_FILE_TEST) $(PWD)/opam.oasis2opam && \
diff -u $(PWD)/opam.oasis2opam $(PWD)/opam | \
grep -v opam.oasis2opam > $(PWD)/opam.diff &&\
diff $(PWD)/opam.diff $(PWD)/opam.diff.exp && \
cp $(PWD)/opam $(OPAM_FILE_TEST) || \
(echo "The opam file needs some update"; exit 2) && \
cd .. ; opam-admin check && opam-admin make -g
opam-rel :
make-opam-pack $(NAME)
opam-test :
make-opam-pack $(NAME) -test
......
OASISFormat: 0.4
Name: lustre-v6
Version: 6.100.0
Version: 6.100.1
Synopsis: The Lustre V6 Verimag compiler
Description: This package contains:
- lv6: the (current) name of the compiler (and interpreter via -exec)
......
No preview for this file type
(** Automatically generated from Makefile.version *)
let tool = "lv6"
let str="6.100.0"
let sha="db7aa5b"
let str="6.100.1"
let sha="9beabcb"
let branch = "master"
let maintainer = "erwan.jahier@univ-grenoble-alpes.fr"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment