-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
573780e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu patch tous ces fichiers à la main ?
Tu peux peut-être t'inspirer des hook npm version ezmaster pour patcher automatiquement
573780e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
573780e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Voici les commandes rajoutées qui permettent de patcher via un coup de sed les différents fichiers concernés par le numéro de version :
https://github.com/Inist-CNRS/ezmaster/blob/master/package.json#L8-L11
Et voici le hook qui se déclenche au moment où on génère une nouvelle version via par exemple la commande "npm version patch" :
https://github.com/Inist-CNRS/ezmaster/blob/master/package.json#L13
Et le dernier hook permet de faire une action une fois la version générée :
https://github.com/Inist-CNRS/ezmaster/blob/master/package.json#L14
(en gros ça va push les modif qui ont été réalisées par les sed et ca va aussi push le tag git qui a été généré automatiquement par "npm version patch")
En gros pour générer une nouvelle version c'est une seule ligne de commande pour le développeur:
npm version patch
(et il faut remplacer "patch" par "minor" ou "major" en fonction du type de version qu'on veut générer => Semantic Versioning)