From 0c94c2d507f48c7b2cbb61198a1642ed4f2e34aa Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sat, 11 Jul 2020 05:12:47 -0400 Subject: [PATCH] [FIX] script git_ venv bin update hasbang with environment --- doc/DEVELOPMENT.md | 18 +++++++++--------- doc/DISCOVER.md | 2 +- doc/GIT_REPO.md | 2 +- doc/HOWTO.md | 2 +- doc/RELEASE.md | 11 ++++++----- script/fork_project.py | 2 +- script/fork_project_ERPLibre.py | 2 +- script/git_change_remote.py | 2 +- script/git_change_remote_https_to_git.py | 2 +- script/git_merge_repo_manifest.py | 2 +- script/git_repo_manifest.py | 2 +- script/git_tool.py | 2 +- 12 files changed, 25 insertions(+), 24 deletions(-) mode change 100644 => 100755 script/git_merge_repo_manifest.py mode change 100644 => 100755 script/git_repo_manifest.py diff --git a/doc/DEVELOPMENT.md b/doc/DEVELOPMENT.md index d0554d5..a0b36c7 100644 --- a/doc/DEVELOPMENT.md +++ b/doc/DEVELOPMENT.md @@ -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 ``` diff --git a/doc/DISCOVER.md b/doc/DISCOVER.md index aa93a3b..7e5ca0e 100644 --- a/doc/DISCOVER.md +++ b/doc/DISCOVER.md @@ -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 diff --git a/doc/GIT_REPO.md b/doc/GIT_REPO.md index c58348b..d4d8603 100644 --- a/doc/GIT_REPO.md +++ b/doc/GIT_REPO.md @@ -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 & diff --git a/doc/HOWTO.md b/doc/HOWTO.md index b337e76..8588b44 100644 --- a/doc/HOWTO.md +++ b/doc/HOWTO.md @@ -1,3 +1,3 @@ # HOW TO ## Update changelog -Please, read documentation (keepachangelog.com)[https://keepachangelog.com] \ No newline at end of file +Please, read documentation [keepachangelog.com](https://keepachangelog.com) \ No newline at end of file diff --git a/doc/RELEASE.md b/doc/RELEASE.md index ec91d48..fe8acbe 100644 --- a/doc/RELEASE.md +++ b/doc/RELEASE.md @@ -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 ``` \ No newline at end of file diff --git a/script/fork_project.py b/script/fork_project.py index c2396a7..b761d83 100644 --- a/script/fork_project.py +++ b/script/fork_project.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!./venv/bin/python import os import sys import argparse diff --git a/script/fork_project_ERPLibre.py b/script/fork_project_ERPLibre.py index ee22908..3a292cc 100644 --- a/script/fork_project_ERPLibre.py +++ b/script/fork_project_ERPLibre.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!./venv/bin/python import os import sys import argparse diff --git a/script/git_change_remote.py b/script/git_change_remote.py index 91b1282..9dbf4f0 100755 --- a/script/git_change_remote.py +++ b/script/git_change_remote.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!./venv/bin/python import os import sys import argparse diff --git a/script/git_change_remote_https_to_git.py b/script/git_change_remote_https_to_git.py index ebdbeec..134177b 100755 --- a/script/git_change_remote_https_to_git.py +++ b/script/git_change_remote_https_to_git.py @@ -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). diff --git a/script/git_merge_repo_manifest.py b/script/git_merge_repo_manifest.py old mode 100644 new mode 100755 index 8db3d12..877b836 --- a/script/git_merge_repo_manifest.py +++ b/script/git_merge_repo_manifest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!./venv/bin/python import os import sys import argparse diff --git a/script/git_repo_manifest.py b/script/git_repo_manifest.py old mode 100644 new mode 100755 index 87c7daa..9076d64 --- a/script/git_repo_manifest.py +++ b/script/git_repo_manifest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!./venv/bin/python import os import sys import argparse diff --git a/script/git_tool.py b/script/git_tool.py index ddad05f..6fc7bb0 100644 --- a/script/git_tool.py +++ b/script/git_tool.py @@ -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