Skip to content
Snippets Groups Projects
Commit d05166db authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

update_duplicate_sources: Rely on clone URL

Rely on the metaproject clone URL instead of its directory name. Works fine
with the bitbucket.org ➔ orus.io move.
parent 00330764
No related branches found
No related tags found
1 merge request!1update_duplicate_sources: Rely on clone URL
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
Add ODOO_ADDONS_PATH env var to start. Add ODOO_ADDONS_PATH env var to start.
Add import_sql script. Add import_sql script.
Add option to bind odoo sources in the image Add option to bind odoo sources in the image
- ``update_duplicate_sources`` now relies on the metaproject clone URL instead
of its directory name. Works fine with the bitbucket.org ➔ orus.io move.
3.0 3.0
--- ---
......
#!/bin/zsh #!/bin/zsh
# vim: set shiftwidth=4 softtabstop=4 tabstop=4 expandtab: # vim: set shiftwidth=4 softtabstop=4 tabstop=4 expandtab:
# #
# This script update another repository that is a copy of the sources # This script updates another repository that is a copy of the sources.
# Made to be shared with external people.
# The resulting repository won't have the full history log but only tags pushed when running this
# script. Also all sources will be merged within one repository (as in no confman / .hgconf).
# #
...@@ -5,7 +8,10 @@ ...@@ -5,7 +8,10 @@
# #
# Assertion: # Assertions:
# - the source project already exist on bitbucket and its name is the same as the metaproject+_sources # - this is run from the metaproject via "odoo_scripts/update_duplicate_sources"
# - the metaproject is on a tag (run "hg id" to make sure)
# - the source project already exists on orus.io and its path is the same as the metaproject with
# the "_sources" suffix
# - the metaproject is the same type as the sources one # - the metaproject is the same type as the sources one
here=$(dirname $0) here=$(dirname $0)
project_home=$(cd $here && cd .. && echo $PWD) project_home=$(cd $here && cd .. && echo $PWD)
...@@ -8,10 +14,7 @@ ...@@ -8,10 +14,7 @@
# - the metaproject is the same type as the sources one # - the metaproject is the same type as the sources one
here=$(dirname $0) here=$(dirname $0)
project_home=$(cd $here && cd .. && echo $PWD) project_home=$(cd $here && cd .. && echo $PWD)
project_name=$(basename $project_home)
source_name=${project_name}_sources
$here/list_modules $here/list_modules
...@@ -32,7 +35,10 @@ ...@@ -32,7 +35,10 @@
if [ -e ".hg" ]; then if [ -e ".hg" ]; then
branch="$(hg id -b)" branch="$(hg id -b)"
tags=($(hg id -t)) tags=($(hg id -t))
hg clone ssh://hg@bitbucket.org/xcg/${source_name} || exit 1 project_url=$(hg paths default)
source_url=${project_url}_sources
source_name=$(basename $source_url)
hg clone $source_url || exit 1
pushd $source_name pushd $source_name
hg update $branch hg update $branch
branch_exist=$? branch_exist=$?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment