[FIX] script git_ venv bin update hasbang with environment

This commit is contained in:
Mathieu Benoit 2020-07-11 05:12:47 -04:00
parent 1589979d2d
commit 0c94c2d507
12 changed files with 25 additions and 24 deletions

View file

@ -35,7 +35,7 @@ ERPLibre was created by this script. It's now deprecated.
Use this script when you need to fork directly from the original source.
Don't use this script if you want to update from ERPLibre and follow mainstream development.
```bash
./venv/bin/python ./script/fork_project.py --github_token GITHUB_KEY --organization NAME
./script/fork_project.py --github_token GITHUB_KEY --organization NAME
```
# Fork all repo for you own organization
@ -43,7 +43,7 @@ Go to your github account and generate a token to access fork option with your u
This command will fork all repos and ERPLibre to your own organization. It keeps track to ERPLibre.
```bash
./venv/bin/python ./script/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME
./script/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME
```
## Generate manifest from csv repo
@ -51,7 +51,7 @@ Add repo in file [./source_repo_addons.csv](./source_repo_addons.csv)
Execute to generate manifest of Repo
```bash
./venv/bin/python ./script/fork_project_ERPLibre.py --skip_fork
./script/fork_project_ERPLibre.py --skip_fork
```
## Move database prod to dev
@ -63,25 +63,25 @@ Run:
# TODO
```bash
./venv/bin/python ./script/git_change_remote.py
./script/git_change_remote.py
```
## Change git url https to git
This will update all urls in git format:
```bash
./venv/bin/python ./script/git_change_remote_https_to_git.py
./script/git_change_remote_https_to_git.py
```
## Diff repo with another project
Tools to display the differences between the repo and another project.
```bash
./venv/bin/python ./script/list_repo_diff.py --sync_to /path/to/project/erplibre --dry_sync
./script/git_change_remote.py --sync_to /path/to/project/erplibre --dry_sync
```
## Sync repo with another project
Tools to synchronise the repo with another project. This will show differences and try to checkout on the same commit in all repo.
```bash
./venv/bin/python ./script/git_change_remote.py --sync_to /path/to/project/erplibre
./script/git_change_remote.py --sync_to /path/to/project/erplibre
```
## Add repo
@ -89,10 +89,10 @@ Access to a new repo, add your URL to file [source_repo_addons.csv](../source_re
Fork the repo to be able to push new code:
```bash
./venv/bin/python ./script/fork_project_ERPLibre.py
./script/fork_project_ERPLibre.py
```
To regenerate only manifest.xml.
```bash
./venv/bin/python ./script/fork_project_ERPLibre.py --skip_fork
./script/fork_project_ERPLibre.py --skip_fork
```

View file

@ -24,7 +24,7 @@ Access to a new repo, add your URL to file [source_repo_addons.csv](../source_re
Execute script:
```bash
./venv/bin/python ./script/git_repo_manifest.py
./script/git_repo_manifest.py
git checkout -b new_branch
git commit -am "Add new repo"
./script/install_locally_dev.sh

View file

@ -46,7 +46,7 @@ git commit -am "[#ticket] subject: short sentence"
### Mix prod and dev to do a stage
When dev contain specific revision with default revision, you want to replace default revision by prod revision and keep specific version, do:
```bash
./venv/bin/python ./script/git_merge_repo_manifest.py --input1 ./manifest/default.dev.xml --input2 ./default.xml --output ./manifest/default.staged.xml
./script/git_merge_repo_manifest.py --input1 ./manifest/default.dev.xml --input2 ./default.xml --output ./manifest/default.staged.xml
git commit -am "Updated manifest/default.staged.xml"
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &

View file

@ -1,3 +1,3 @@
# HOW TO
## Update changelog
Please, read documentation (keepachangelog.com)[https://keepachangelog.com]
Please, read documentation [keepachangelog.com](https://keepachangelog.com)

View file

@ -16,13 +16,14 @@ Update file CHANGELOG.md and create a section with new version.
Merge it when maintener accept it.
Add a tag on the commit on branch master with your release.
> git tag v#.#.#
Push your tag
> git push --tags
```bash
git tag v#.#.#
# Push your tags
git push --tags
```
# TIPS
## Compare diff repo with another ERPLibre project
To generate a list of differences between repo git commit, do
```bash
./venv/bin/python ./script/git_change_remote.py --sync_to /path/to/directory
./script/git_change_remote.py --sync_to /path/to/directory
```

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!./venv/bin/python
import os
import sys
import argparse

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!./venv/bin/python
import os
import sys
import argparse

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!./venv/bin/python
import os
import sys
import argparse

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!./venv/bin/python
# © 2020 TechnoLibre (http://www.technolibre.ca)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

2
script/git_merge_repo_manifest.py Normal file → Executable file
View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!./venv/bin/python
import os
import sys
import argparse

2
script/git_repo_manifest.py Normal file → Executable file
View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!./venv/bin/python
import os
import sys
import argparse

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!./venv/bin/python
# © 2020 TechnoLibre (http://www.technolibre.ca)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import os