Skip to content

update how to make common subtree #622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ main:
## Start Here

This repository is never used as standalone. It is usually imported in each pattern as a subtree.
In order to import the common/ the very first time you can use
`https://github.com/validatedpatterns/multicloud-gitops/blob/main/common/scripts/make_common_subtree.sh`
In order to import the common subtree the very first time you can use the script
[make_common_subtree.sh](scripts/make-common-subtree.sh).

In order to update your common subtree inside your pattern repository you can either use
`https://github.com/validatedpatterns/utilities/blob/main/scripts/update-common-everywhere.sh` or
do it manually by doing the following:
do it manually with the following commands:

```sh
git remote add -f upstream-common https://github.com/validatedpatterns/common.git
git merge -s subtree -Xtheirs -Xsubtree=common upstream-common/main
git remote add -f common-upstream https://github.com/validatedpatterns/common.git
git merge -s subtree -Xtheirs -Xsubtree=common common-upstream/main
```

## Secrets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ "$1" = "-h" ]; then
echo "$0 <subtree_repo> <subtree_branch> <subtree_remote_name>"
echo
echo "Run without arguments, the script would run as if these arguments had been passed:"
echo "$0 https://github.com/hybrid-cloud-patterns/common.git main common-subtree"
echo "$0 https://github.com/validatedpatterns/common.git main common-upstream"
echo
echo "Please ensure the git subtree command is available. On RHEL/Fedora, the git subtree command"
echo "is in a separate package called git-subtree"
Expand Down Expand Up @@ -41,7 +41,7 @@ fi
if [ "$1" ]; then
subtree_repo=$1
else
subtree_repo=https://github.com/hybrid-cloud-patterns/common.git
subtree_repo=https://github.com/validatedpatterns/common.git
fi

if [ "$2" ]; then
Expand All @@ -53,7 +53,7 @@ fi
if [ "$3" ]; then
subtree_remote=$3
else
subtree_remote=common-subtree
subtree_remote=common-upstream
fi

git diff --quiet || (echo "This script must be run on a clean working tree" && exit 1)
Expand Down