Skip to content

Commit

Permalink
verify browser is in stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
liias committed Nov 10, 2024
1 parent 29263d7 commit 85bc2f3
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
51 changes: 48 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,20 @@ jobs:
run: |
install_dir="$HOME/.local/bin"
cd "$install_dir"
./browsers --no-gui https://browsers.software
command_output=$(./browsers --no-gui https://browsers.software)
echo $command_output
if $command_output | grep -q 'Firefox Web Browser'; then
echo "matched Firefox Web Browser"
fi
if $command_output | grep -q 'Google Chrome'; then
echo "matched Google Chrome"
fi
if $command_output | grep -q 'Microsoft Edge'; then
echo "matched Microsoft Edge"
fi
shell: bash
- name: Upload release artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -202,7 +215,21 @@ jobs:
target_dir='target/universal-apple-darwin/release'
cd "$target_dir"
set -x
open ./Browsers.app -W --stdout $(tty) --stderr $(tty) --args --no-gui https://browsers.software
command_output=$(./Browsers.app -W --stdout $(tty) --stderr $(tty) --args --no-gui https://browsers.software)
echo $command_output
if $command_output | grep -q 'Safari'; then
echo "matched Safari"
fi
if $command_output | grep -q 'Chrome'; then
echo "matched Chrome"
fi
if $command_output | grep -q 'Google Chrome for Testing'; then
echo "matched Google Chrome for Testing"
fi
# special shell script to make tty working
shell: 'script -q /dev/null bash -e {0}'
- name: Upload mac artifacts
Expand Down Expand Up @@ -281,7 +308,25 @@ jobs:
run: |
install_dir="$PROGRAMFILES/software.Browsers"
cd "$install_dir"
./browsers.exe --no-gui https://browsers.software
command_output=$(./browsers.exe --no-gui https://browsers.software)
echo $command_output
if $command_output | grep -q 'Mozilla Firefox'; then
echo "matched Mozilla Firefox"
fi
if $command_output | grep -q 'Google Chrome'; then
echo "matched Google Chrome"
fi
if $command_output | grep -q 'Internet Explorer'; then
echo "matched Internet Explorer"
fi
if $command_output | grep -q ' Microsoft Edge Profile 1'; then
echo "matched Microsoft Edge (Profile 1)"
fi
shell: bash
- name: Upload release artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion src/gui/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ impl UIBrowser {
pub fn get_full_name(&self) -> String {
return if self.supports_profiles {
format!(
"{} {}",
"{} ({})",
self.browser_name.to_string(),
self.profile_name.as_str()
)
Expand Down

0 comments on commit 85bc2f3

Please sign in to comment.