Commit 33ebb9bb authored by Dorchies David's avatar Dorchies David
Browse files

Merge branch 'master' into 'devel'

Integrate last changes for release version into devel branch

See merge request !135
parents ea3d5157 b99c47a5
Pipeline #36084 passed with stages
in 18 minutes and 7 seconds
......@@ -81,6 +81,7 @@ test:
- tags
- schedules
- web
- master
script:
- npm run e2e
......@@ -117,7 +118,8 @@ deploy-dev:
- build
script:
# Copie de la branche / du tag
- ./scripts/deploy-version.sh $CI_COMMIT_REF_NAME $DEV_LOGIN $DEV_HOST $DEV_PATH
- if [[ $CI_COMMIT_REF_NAME != "stable" ]]; then ./scripts/deploy-version.sh $CI_COMMIT_REF_NAME $DEV_LOGIN $DEV_HOST $DEV_PATH; fi
- if [[ $CI_COMMIT_REF_NAME == "stable" ]]; then ./scripts/deploy-version.sh $CI_COMMIT_REF_NAME $DEV_LOGIN $DEV_HOST $DEV_PATH/stable; fi
deploy-prod:
stage: deploy-prod
......
......@@ -5,22 +5,22 @@
#### Nouvelles fonctionnalités
* PAB : Variation du débit d'attrait ([nghyd#431](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/431))
* Ajouter un bouton "Annuler" sur la saisie des paramètres variables ([jalhyd#300](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/300),[nghyd#507](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/507))
* Prébarrages : mettre les enfants invalides en rouge dans le schéma ([jalhyd#298](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/298),[nghyd#484](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/484))
* Ajouter un bouton "Annuler" sur la saisie des paramètres variables ([jalhyd#300](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/300), [nghyd#507](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/507))
* Prébarrages : mettre les enfants invalides en rouge dans le schéma ([jalhyd#298](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/298), [nghyd#484](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/484))
#### Changements
* Fente Larinier : laisser le coefficient de débit vide ([nghyd#515](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/515))
* Cloisons : Générer une PAB : vider les champs ([jalhyd#306](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/306),[nghyd#516](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/516))
* Cloisons : Générer une PAB : vider les champs ([jalhyd#306](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/306), [nghyd#516](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/516))
#### Correction de bogues
* Courbe de remous: crash de l'application sur données erronées ([jalhyd#307](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/307),[nghyd#532](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/532))
* Courbe de remous: crash de l'application sur données erronées ([jalhyd#307](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/307), [nghyd#532](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/532))
Deux bugs en un, l'appli crashe quand :
- la hauteur de berge dépasse une certaine valeur avec des paramètres corrects pour effectuer un calcul (par exemple les valeurs par défaut)
- les deux cotes de l'eau se situent sous les cotes de fond amont et aval
* Sections : non convergence du calcul du tirant d'eau critique ([jalhyd#301](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/301),[nghyd#528](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/528))
* Sections : non convergence du calcul du tirant d'eau critique ([jalhyd#301](https://gitlab.irstea.fr/cassiopee/jalhyd/-/issues/301), [nghyd#528](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/528))
* Remettre le paramètre dans son état initial quand le dialogue "Varier" est annulé ([nghyd#508](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/508))
* Prébarrages: les champs ne sont pas vides lors des ajouts de bassins et cloisons ([nghyd#503](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/503))
* Mode "champs vides par défaut" : changer le type d'un ouvrage (ex: dans Cloisons) remplit les champs ([nghyd#480](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/480))
......@@ -35,7 +35,7 @@
* Nightly build: clean folder before installation ([nghyd#495](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/495))
* Transfert du site de production sur OVH ([nghyd#505](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/505))
* Plantage des tests e2e sur le chargement des exemples ([nghyd#530](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/530),[nghyd#531](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/531))
* Plantage des tests e2e sur le chargement des exemples ([nghyd#530](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/530), [nghyd#531](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/531))
- Les champs des exemples chargés sont vides lorsque le mode "champ vides" est activé.
- Les tests e2e plantent par manque de temporisation
* CI : les jobs build en schedule de master et devel plantent ([nghyd#527](https://gitlab.irstea.fr/cassiopee/nghyd/-/issues/527))
......
......@@ -6,25 +6,35 @@ See also [developers documentation](DEVELOPERS.md) (in french)
### Requirements
Requirements for developping Cassiopee can be achieved by manually install the required dependencies on your computer or by using the dedicated docker container.
#### Required dependencies
* [jalhyd](https://gitlab.irstea.fr/cassiopee/jalhyd)
* npm
* python3
* pandoc ^2 (optional, for PDF documentation only)
* texlive (optional, for PDF documentation only)
Building the HTML documentation requires MkDocs and some extensions:
```sh
sudo apt install python3-pip python3-setuptools
python3 -m pip install mkdocs python-markdown-math mkdocs-material
```
Building the PDF documentation requires pandoc and a LaTeX distribution (for ex. texlive) with a few packages:
```sh
sudo apt install pandoc texlive latexmk texlive-latex-extra texlive-bibtex-extra
```
#### Using docker container
Download and use the following docker image: https://hub.docker.com/repository/docker/geaucassiopee/ci-cd-cross-platform-webapp
More details on how to use it on vscode are available at https://gitlab.irstea.fr/cassiopee/cassiopee2-integration
### Install dependencies
#### JaLHyd
......@@ -40,9 +50,11 @@ npm run package
Then in `nghyd` folder, run :
```sh
npm install
npm ci --force --unsafe-perm
```
This installs the exact same version of dependencies as the ones specified in `package.lock.json`.
The parameter `--unsafe-perm` solves permissions issues for running e2e tests in a docker container.
### Compile and get a deployable Web app
......@@ -225,7 +237,7 @@ npm install -g tsviz
```
There's currently a bug on debian like distribution due to a wrong declaration of graphviz path in the code: https://github.com/joaompneves/tsviz/issues/5
As a workaround, you can create a link to the right path: `sudo ln -s /usr/bin/dot /usr/local/bin/dot`
As a workaround, you can create a link to the right path: `sudo ln -s /usr/bin/dot /usr/local/bin/dot`
To draw the diagram:
```sh
......@@ -251,11 +263,11 @@ sudo find /usr/lib/node_modules/protractor -regextype sed -regex "^.*/chromedriv
Use [semantic versioning](https://semver.org/).
**It's discouraged to execute release steps manually, see Release Script below**
**It's discouraged to execute release steps manually, skip this section and see Release Script below**
Before releasing a new stable version, a new version of JaLHyd should be tagged, see "Release Policy" in [JaLHyd's README.md](https://gitlab.irstea.fr/cassiopee/jalhyd/blob/master/README.md)
Then, one should complete the following files
Then, one should complete the following files:
- `CHANGELOG.md`
- `package.json` (update "version", or use `npm version`)
- `jalhyd_branch` (be sure that it contains "master" or is empty)
......@@ -270,12 +282,16 @@ The `stable` tag should be set **before** the version tag, so that `git describe
**Important:** the release script assumes that you run it from the current nghyd source directory `nghyd`, and that JaLHyd source directory `jalhyd` is present at the same level.
Before running the script:
* update `CHANGELOG.md` in both JaLHyd and NgHyd
* set the content of `jalhyd_branch` to "master"
This script:
* checks out "master" branch of JaLHyd, pulls the latest changes, installs dependencies, runs unit tests, commits changes if any
* updates JaLHyd version, commits changes
* updates JaLHyd version in `package.json`, commits changes
* creates the right tags for JaLHyd and pushes them
* checks out "master" branch of NgHyd, pulls the latest changes, installs dependencies, commits changes if any
* updates NgHyd version, commits changes
* updates NgHyd version in `package.json`, commits changes
* creates the right tags for NgHyd and pushes them
It **does not** check that `jalhyd_branch` is OK nor that `jalhyd/CHANGELOG.md` and `nghyd/CHANGELOG.md` are up to date, but reminds you to do it.
......
......@@ -16,17 +16,21 @@ describe("ngHyd - check parameter mode is set to its previous value - ", () => {
it("when min/max/list values dialog is cancelled", async () => {
// start page
await listPage.navigateTo();
await browser.sleep(500);
// open PAB chute
await listPage.clickMenuEntryForCalcType(12);
await browser.sleep(500);
// click "calc" radio on Z1 parameter
const z1calcbtn = element(by.id("mat-button-toggle-3"));
await z1calcbtn.click();
await browser.sleep(200);
// click "var" radio on Z1 parameter
const z1varbtn = element(by.id("mat-button-toggle-2"));
await z1varbtn.click();
await browser.sleep(200);
// click cancel button
const cancelbtn = element(by.id("btn-cancel"));
......
devel
\ No newline at end of file
master
{
"name": "fr.irstea.cassiopee",
"version": "4.14.2",
"version": "4.15.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -4026,7 +4026,8 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.1.tgz",
"integrity": "sha512-HRZPIjPcbwAVQvOTxR4YE3o8Xs98NqbbL1iEZDCz7CL8ql0Lt5iOyJFxfnAB0oFs8Oh02F/lLlg30Mexv46LjA==",
"dev": true
"dev": true,
"optional": true
},
"boxen": {
"version": "4.2.0",
......@@ -11693,11 +11694,13 @@
"dependencies": {
"@types/base-64": {
"version": "0.1.3",
"bundled": true
"resolved": "https://registry.npmjs.org/@types/base-64/-/base-64-0.1.3.tgz",
"integrity": "sha512-DJpw7RKNMXygZ0j2xe6ROBqiJUy7JWEItkzOPBzrT35HUWS7VLYyW9XJX8yCCvE2xg8QD7wesvVyXFg8AVHTMA=="
},
"base-64": {
"version": "0.1.0",
"bundled": true
"resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz",
"integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs="
}
}
},
......
......@@ -3,7 +3,7 @@
"displayName": "Cassiopée",
"description": "Hydraulic calculators",
"author": "Inrae",
"version": "4.14.2",
"version": "4.15.0",
"main": "main.js",
"homepage": "https://cassiopee.g-eau.fr",
"license": "MIT",
......
......@@ -37,11 +37,12 @@ exports.config = {
args: [
"--no-sandbox",
"--headless",
"--window-size=1024x768"
"--window-size=1024x768",
"--disable-dev-shm-usage"
],
prefs: {
download: {
prompt_for_download: false,
prompt_for_download: false,
directory_upgrade: true,
// default_directory: '/tmp/e2e-downloads'
},
......
......@@ -38,21 +38,22 @@ git checkout master
git pull --rebase
npm install
npm run jasmine
if [ ! -z "$(git status --porcelain)" ]
then
if [ ! -z "$(git status --untracked-files=no --porcelain)" ]
then
echo "commiting changes induced by 'npm install'"
git commit -a -m "verify dependencies (npm install) before deploying version $VERSION"
fi
# 1.3 version in package.*
npm version "$VERSION" --allow-same-version --git-tag-version=false
if [ ! -z "$(git status --porcelain)" ]
then
if [ ! -z "$(git status --untracked-files=no --porcelain)" ]
then
echo "commiting changes induced by 'npm version'"
git commit -a -m "update package.* to version $VERSION"
fi
# 1.4 tags
echo "setting tags to $VERSION version"
git tag -fa "nghyd_$VERSION" -m "release version $VERSION"
sleep 1
git tag -fa stable -m "stable version"
......@@ -71,7 +72,7 @@ cd ../nghyd
git checkout master
git pull --rebase
npm install
if [ ! -z "$(git status --porcelain)" ]
if [ ! -z "$(git status --untracked-files=no --porcelain)" ]
then
echo "commiting changes induced by 'npm install'"
git commit -a -m "verify dependencies (npm install) before deploying version $VERSION"
......@@ -79,13 +80,14 @@ fi
# 2.3 version in package.*
npm version "$VERSION" --allow-same-version --git-tag-version=false
if [ ! -z "$(git status --porcelain)" ]
then
if [ ! -z "$(git status --untracked-files=no --porcelain)" ]
then
echo "commiting changes induced by 'npm version'"
git commit -a -m "update package.* to version $VERSION"
fi
# 2.4 tags
echo "setting tags to $VERSION version"
git tag -fa stable -m "stable version"
sleep 1
git tag -fa "$VERSION" -m "release version $VERSION"
......
#!/bin/bash
set -o errexit
# Output command lines for debugging
set -x
# Fabrique les exécutables electron/cordova pour une version de Cassiopée $1, les
# distribue sur le serveur $2@$3 dans le dossier $4, et met à jour le fichier releases.json
......@@ -40,11 +42,11 @@ if (( $update_latest )); then
# fetch current releases file
scp "$HOST_LOGIN:$RELEASES_FILE" "./$TMP_RELEASES_FILE"
grep -P "\"latest\": \"$VERSION\"" "$TMP_RELEASES_FILE"
if [[ $? == 0 ]]; then
if [[ -n $(grep -P "\"latest\": \"$VERSION\"" "$TMP_RELEASES_FILE") ]]; then
echo "$VERSION est déjà la version la plus récente, pas de mise à jour du fichier releases.json"
else
echo "mise à jour du fichier releases.json à la version $VERSION"
sed -i -E "s/\"latest\": .+,/\"latest\": \"$VERSION\",/" "$TMP_RELEASES_FILE"
echo -e "\t\"$VERSION\": {
\t\t\"darwin\": \"Cassiopée-${VERSION}-mac.zip\",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment