Commit 1b12954f authored by Fabrice Gangler's avatar Fabrice Gangler 🎨 Committed by Matthieu FAURE
Browse files

DOC: prepare release (changelog + upgrade doc)

parent 18b7a62c
Pipeline #10027 passed with stage
in 4 minutes and 7 seconds
......@@ -5,24 +5,20 @@ Tous les changements notables de ce projet sont documentés dans ce fichier.
Le format s'appuie sur [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
et le projet suit [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## Unreleased yet ---> [2.7.x](#) - 2020-0x-xx
* [...](#)
## [2.8.0](https://gitlab.adullact.net/Comptoir/Comptoir-srv/tags/v2.8.0) - 2020-06-1x
Unreleased yet
### Added
...
### Changed
...
* [#903](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/903) Ajout du formulaire d'édition de la cartographie
* [#917](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/917) Page d'un utilisateur : afficher les données de la cartographie
* [#918](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/918) Page d'un logiciel : afficher les données de la cartographie
### Fixed
...
### Deprecated
...
### Security
...
* [#910](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/910) Traitement correcte des langues utilisateur non supportées par l'application
* [#914](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/914) Cartographie : corriger les chaines de textes non traduites
* [#915](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/915) Cartographie : modification des textes (titres, boutons, tableaux, ...)
* [#919](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/919) Cartographie : le formulaire s'affiche uniquement si on est déjà déclaré comme utilisateur du logiciel
* [#898](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/898) Correction du bug des boutons non utilisables après l'édition de son profil
## [2.7.0](https://gitlab.adullact.net/Comptoir/Comptoir-srv/tags/v2.7.0) - 2020-05-29
......
# How to upgrade from v2.7.0 to v2.8.0
## 1) First backup (DB + images files)
```bash
# (1) user comptoir
sudo su comptoir
# First backup (DB + images files)
/home/comptoir/Comptoir-srv/bin/COMPTOIR_export_DB_data_AND_images.sh
/home/comptoir/Comptoir-srv/bin/COMPTOIR_export_DB_structure_only.sh
ls -lh /home/comptoir/Comptoir-EXPORT/
```
## 2) Preloading vendor directory
```bash
# (1) use the user "comptoir"
sudo su comptoir
# Preloading vendor
mkdir /home/comptoir/tmp_migration
cd /home/comptoir/tmp_migration
git clone https://gitlab.adullact.net/Comptoir/Comptoir-srv.git
mv Comptoir-srv/ Comptoir_tmp_update_vendor
cd Comptoir_tmp_update_vendor/
git checkout origin/master
git log --decorate --oneline --graph --all
composer check-platform-reqs
composer validate
composer install
```
## 3) Activate maintenance site
see:
[www-maintenance-comptoir](https://gitlab.adullact.net/Adullact-prive/comptoir-prive/www-maintenance-comptoir)
(private repository)
```bash
# (1) use your user
# Activate maintenance site
sudo a2dissite 25-https_comptoir-du-libre.org.conf
sudo a2ensite 30-503-MAINTENANCE_https_comptoir-du-libre.org.conf
sudo service apache2 reload
# on your computer, the following command lines
# must retrun an HTTP 500 response
curl -v https://comptoir-du-libre.org/
curl -v https://comptoir-du-libre.org/notFoundPage
```
## 4) Backup before migration (DB + images files + main directory)
```bash
# (1) user comptoir
sudo su comptoir
# Second backup (DB + images files)
/home/comptoir/Comptoir-srv/bin/COMPTOIR_export_DB_data_AND_images.sh
/home/comptoir/Comptoir-srv/bin/COMPTOIR_export_DB_structure_only.sh
ls -lh /home/comptoir/Comptoir-EXPORT/
# Backup main directory
cd /home/comptoir/
DATE=$(date +"%Y.%m.%d_%Hh%M")
tar -czvf "Comptoir-srv_BACKUP_${DATE}.tar.gz" Comptoir-srv
```
## 5) Update source code
```bash
# (1) user comptoir
sudo su comptoir
# Update source code
cd /home/comptoir/Comptoir-srv
rm -rvf vendor/
git remote -v
git remote update -p
git checkout origin/master
git log --decorate --oneline --graph --all
```
## 6) Update vendor directory + clean cache
```bash
# (1) user comptoir
sudo su comptoir
# Update vendor directory (see step 2 "Preloading vendor directory")
cd /home/comptoir/Comptoir-srv
rm -rvf vendor/
mv -v ../tmp_migration/Comptoir_tmp_update_vendor/vendor ./
# Clean cache
cd /home/comptoir/Comptoir-srv
bin/cake cache clear_all
```
## 7) Apply migration of the database (new tables, adding fields, ...)
The following changes must be recorded in the [production version tracking](https://gitlab.adullact.net/Adullact-prive/comptoir-prive/Exploitation-Comptoir/-/blob/master/Suivi-versions-PROD.md) file.
```bash
# (1) user comptoir
sudo su comptoir
# Apply migration of the database (new tables, adding fields, ...)
cd /home/comptoir/Comptoir-srv
bin/cake migrations migrate
# Now you can apply additional changes in SQL with pgsl
# ---> nothing to do here for this version
```
## 8) Update config files
The following changes must be recorded in the [production version tracking](https://gitlab.adullact.net/Adullact-prive/comptoir-prive/Exploitation-Comptoir/-/blob/master/Suivi-versions-PROD.md) file.
see:
[commit 0ecfad95](https://gitlab.adullact.net/Comptoir/Comptoir-srv/-/commit/0ecfad951986c89e98fc93684682e88e3808140e#db083217133df62cac95237c2e964e0a9e319847_50_50)
"FEAT(mapping)!: adding edit button"
```bash
# (1) user comptoir
sudo su comptoir
# Apply additional changes in config files
cd /home/comptoir/Comptoir-srv
vim config/comptoir.php
vim config/app.php # ---> nothing to do here for this version
```
## 9) Enable the main website
see:
[www-maintenance-comptoir](https://gitlab.adullact.net/Adullact-prive/comptoir-prive/www-maintenance-comptoir)
(private repository)
```bash
# (1) use your user
# Enable the main website
sudo a2dissite 30-503-MAINTENANCE_https_comptoir-du-libre.org.conf
sudo a2ensite 25-https_comptoir-du-libre.org.conf
sudo service apache2 reload
# on your computer, the first following command line
# must return an HTTP 200 response code
# and the second return an HTTP 404 response code.
curl -v https://comptoir-du-libre.org/
curl -v https://comptoir-du-libre.org/notFoundPage
```
## 10) Backup after upgraded
```bash
# (1) user comptoir
sudo su comptoir
# Backup after upgraded (DB + images files)
/home/comptoir/Comptoir-srv/bin/COMPTOIR_export_DB_data_AND_images.sh
/home/comptoir/Comptoir-srv/bin/COMPTOIR_export_DB_structure_only.sh
ls -lh /home/comptoir/Comptoir-EXPORT/
```
## 11) Clean up
```bash
# (1) user comptoir
sudo su comptoir
# Clean up
cd /home/comptoir/
rm -rvf tmp_migration/
rm -v Comptoir-srv_BACKUP_*.tar.gz
```
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