-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix
run_tests.sh
; refactor Bash scripts (#89)
- Loading branch information
1 parent
186a860
commit c93f6ec
Showing
4 changed files
with
36 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Validate that PLATFORM is either 'chrome' or 'firefox' | ||
validate_platform() { | ||
local platform=$1 | ||
if [[ ! $platform =~ ^(chrome|firefox)$ ]]; then | ||
echo "Invalid platform: $platform" | ||
echo "Platform should be either chrome or firefox" | ||
exit 1 | ||
fi | ||
} | ||
|
||
# Generate manifest.json from platform-specific template | ||
generate_manifest() { | ||
local platform=$1 | ||
local version=${2:-0.0.0} | ||
|
||
cat "src/manifest-$platform.json" \ | ||
| jq --arg version "$version" '.version = $version' \ | ||
> src/manifest.json | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters