Skip to content

Commit

Permalink
docs: add detailed documentation for PixeneOS (#52)
Browse files Browse the repository at this point in the history
Thorough review and multiple proof readings have been done.
  • Loading branch information
pixincreate authored Oct 20, 2024
1 parent c3cca1b commit 3c83fb7
Show file tree
Hide file tree
Showing 8 changed files with 317 additions and 69 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# Convert inputs to proper boolean values
root=${{ github.event.inputs.root }}
magisk_preinit_device=${{ github.event.inputs.magisk-preinit-device }}
# Ensure that the boolean comparison is correctly handled
if [ "$root" == "true" ] && [ -z "$magisk_preinit_device" ]; then
echo -e "::error:: magisk-preinit-device is required when root is true."
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
for required_asset in "${required_assets[@]}"; do
# Convert wildcard pattern to regex
regex="${required_asset//\*/.*}"
for asset in "${existing_assets[@]}"; do
# if existing asset matches the required asset, break the loop
if ! [[ $asset =~ $regex ]]; then
Expand All @@ -129,7 +129,7 @@ jobs:
break
fi
done
# Check if valid_build is either "magisk" or "rootless"
if [[ "$valid_build" == "magisk" ]] || [[ "$valid_build" == "rootless" ]]; then
echo -e "Proceeding with build to create missing assets..."
Expand Down Expand Up @@ -179,8 +179,8 @@ jobs:
# Instead of running the script directly,
# we source it to get the variables in the current shell and use them in the next steps by exporting them
source src/main.sh
. src/main.sh
# Export the variables for the next steps
echo "GRAPHENEOS_OTA_TARGET=${GRAPHENEOS[OTA_TARGET]}" >> $GITHUB_ENV
echo "OUTPUTS_PATCHED_OTA=${OUTPUTS[PATCHED_OTA]}" >> $GITHUB_ENV
Expand All @@ -207,21 +207,21 @@ jobs:
CURRENT_COMMIT=$(git rev-parse --short HEAD)
FLAVOR=("magisk" "rootless")
root=${{ github.event.inputs.root }}
# Create `magisk` and `rootless` directories if they don't exist
mkdir -p "${FLAVOR}"
# Switch to gh-pages branch
git checkout gh-pages
echo -e "Updating Configs for the new release..."
# If root is true or the the release has `magisk` in <device_name>.json, use magisk flavor
if [ "${root}" = "true" ] || grep -q magisk "${{ env.DEVICE_NAME }}.json"; then
TARGET_FILE="${FLAVOR[0]}/${{ env.DEVICE_NAME }}.json"
else
TARGET_FILE="${FLAVOR[1]}/${{ env.DEVICE_NAME }}.json"
fi
echo -e "Updating Configs for the new release..."
# Check if the target file exists, if not create an empty one to avoid any issues
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": false
}
Loading

0 comments on commit 3c83fb7

Please sign in to comment.