dynatrace-oss / progressiveDelivery-masterclass

Apache License 2.0
4 stars 11 forks source link

Need multi platform find and replace #57

Closed agardnerIT closed 1 year ago

agardnerIT commented 1 year ago

Neither find nor sed are available on windows. Need a multi-platform approach. Furthermore, windows doesn't include any native solution.

It appears that only 5 files need to be altered:

agardnerIT commented 1 year ago

Windows

set YOURHANDLE=YourGitHubUserNameHere
set YOURREPOSITORY=YourGitHubRepoHere

docker run --rm -v %cd%:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/%YOURHANDLE%/%YOURREPOSITORY%_g" /files/gitops/app-of-apps.yaml
docker run --rm -v %cd%:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/%YOURHANDLE%/%YOURREPOSITORY%_g" /files/gitops/applications/argo-config.yaml
docker run --rm -v %cd%:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/%YOURHANDLE%/%YOURREPOSITORY%_g" /files/gitops/applications/demo-application.yaml
docker run --rm -v %cd%:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/%YOURHANDLE%/%YOURREPOSITORY%_g" /files/gitops/applications/ingress-nginx.yaml
docker run --rm -v %cd%:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/%YOURHANDLE%/%YOURREPOSITORY%_g" /files/gitops/applications/cert-manager.yaml

Linux

export YOURHANDLE=YourGitHubUserNameHere
export YOURREPOSITORY=YourGitHubRepoHere

docker run --rm -v $pwd:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/$YOURHANDLE/$YOURREPOSITORY_g" /files/gitops/app-of-apps.yaml
docker run --rm -v $pwd:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/$YOURHANDLE/$YOURREPOSITORY_g" /files/gitops/applications/argo-config.yaml
docker run --rm -v $pwd:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/$YOURHANDLE/$YOURREPOSITORY_g" /files/gitops/applications/demo-application.yaml
docker run --rm -v $pwd:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/$YOURHANDLE/$YOURREPOSITORY_g" /files/gitops/applications/ingress-nginx.yaml
docker run --rm -v $pwd:/files busybox:stable sed -i "s_github.com/AloisReitbauer/progressiveDelivery-masterclass_github.com/$YOURHANDLE/$YOURREPOSITORY_g" /files/gitops/applications/cert-manager.yaml
agardnerIT commented 1 year ago

60 will close this