Skip to content

Commit 11b0923

Browse files
authored
Merge pull request #55292 from gabriel-rh/github-codespaces-gitpod-handle-branches
Support branches other than main for github codespaces and gitpod
2 parents 2020b2e + e590f5e commit 11b0923

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"image": "mcr.microsoft.com/vscode/devcontainers/ruby:2.7",
55
//"image": "quay.io/rhn_support_gmcgoldr/vscode-ruby27-asciibinder",
66

7-
"postCreateCommand": "gem install asciidoctor asciidoctor-diagram ascii_binder && asciibinder build --distro=openshift-enterprise && cd _preview/openshift-enterprise/main && ln -s welcome/index.html index.html && ruby -run -ehttpd . -p8000"
7+
"postCreateCommand": "gem install asciidoctor asciidoctor-diagram ascii_binder && asciibinder build --distro=openshift-enterprise && BR=\"$(git branch --show-current)\" && cd _preview/openshift-enterprise/$BR && ln -s welcome/index.html index.html && ruby -run -ehttpd . -p8000"
88
//"postCreateCommand": "asciibinder build --distro=openshift-enterprise && cd _preview/openshift-enterprise/main && ln -s welcome/index.html index.html && ruby -run -ehttpd . -p8000"
99

1010
// Features to add to the dev container. More info: https://containers.dev/features.a

.gitpod.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ tasks:
1010
# pip3 install aura.tar.gz
1111
command: |
1212
asciibinder build --distro=openshift-enterprise
13-
cd _preview/openshift-enterprise/main
13+
BR="$(git branch --show-current)"
14+
cd _preview/openshift-enterprise/$BR
1415
ln -s welcome/index.html index.html
1516
python -m http.server

0 commit comments

Comments
 (0)