diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7f9ce3c..03d45dc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -40,7 +40,7 @@ jobs: echo -e "User-agent: *\nDisallow: /" > public/robots.txt fi - - name: Fetch and Update Download Link + - name: Fetch and Update Morphe Download Link run: | MANAGER_PROPS_URL="https://raw.githubusercontent.com/HundEdFeteTree/HappyFunTest/refs/heads/main/gradle.properties" # FIXME: Update this to real repo: @@ -54,11 +54,34 @@ jobs: # Create a temporary file preserving other redirects # We ignore grep's exit code in case the file doesn't exist or has no matches - grep -v -E '(^/download/?\s)' public/_redirects > public/_redirects.tmp || true + grep -v -E '(^/download\s)' public/_redirects > public/_redirects.tmp || true # Now append the new redirects - echo "/download/ $DOWNLOAD_URL 302" >> public/_redirects.tmp - echo "/download $DOWNLOAD_URL 302" >> public/_redirects.tmp + echo "/download $DOWNLOAD_URL 301" >> public/_redirects.tmp + + # Replace the original file + mv public/_redirects.tmp public/_redirects + + echo "Updated _redirects file:" + cat public/_redirects + + - name: Fetch and Update MicroG Download Link + run: | + MICROG_BUILD_GRADLE_URL="https://raw.githubusercontent.com/WSTxda/MicroG-RE/refs/heads/master/build.gradle" + # parse out "ext.appVersionName = x.xx" + VERSION=$(curl -s $MICROG_BUILD_GRADLE_URL | grep "appVersionName" | head -n 1 | cut -d '=' -f 2 | tr -d " '\"[:space:]") + if [ -z "$VERSION" ]; then + echo "Error: Could not find appVersionName in build.gradle." >&2 + exit 1 + fi + DOWNLOAD_URL="https://github.com/WSTxda/MicroG-RE/releases/download/$VERSION/microg-release.apk" + + # Create a temporary file preserving other redirects + # We ignore grep's exit code in case the file doesn't exist or has no matches + grep -v -E '(^/microg/download\s)' public/_redirects > public/_redirects.tmp || true + + # Now append the new redirect + echo "/microg/download $DOWNLOAD_URL 301" >> public/_redirects.tmp # Replace the original file mv public/_redirects.tmp public/_redirects diff --git a/.gitignore b/.gitignore index 05a71f5..8fba81b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,27 @@ # Default ignored files /.idea/** -/node_modules/** \ No newline at end of file +/node_modules/** + +# Dependencies +node_modules/ +package-lock.json + +# Wrangler +.wrangler/ +.dev.vars +.mf/ + +# IDEs +.idea/ +.vscode/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + +# Logs +*.log +npm-debug.log* diff --git a/public/_redirects b/public/_redirects index 279c327..6085230 100644 --- a/public/_redirects +++ b/public/_redirects @@ -1,2 +1,7 @@ -/download/ https://github.com/MorpheApp/morphe-manager/releases/download/v1.0.0-dev.2/morphe-manager-1.0.0-dev.2.apk 302 -/download https://github.com/MorpheApp/morphe-manager/releases/download/v1.0.0-dev.2/morphe-manager-1.0.0-dev.2.apk 302 +/donate /#donate 307 +/donate/ /#donate 307 +/download/ /download 308 +/microg/download/ /download/microg 308 + +/download https://github.com/MorpheApp/morphe-manager/releases/download/v1.0.0/morphe-manager-1.0.0.apk 301 +/microg/download https://github.com/WSTxda/MicroG-RE/releases/download/5.13/microg-release.apk 301 diff --git a/public/donate/index.html b/public/donate/index.html deleted file mode 100644 index bb72cb9..0000000 --- a/public/donate/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - -
- - - - - diff --git a/public/index.html b/public/index.html index bcbce68..5c2fbbf 100644 --- a/public/index.html +++ b/public/index.html @@ -496,7 +496,7 @@+ microG is required to use YouTube Morphe +
+ ++ microG provides Google Play Services support, enabling the use of your Google account with YouTube Morphe. +
++ microG is an open-source reimplementation of Google services that respects your privacy while providing essential functionality. +
++ Install microG once and it works with all your Morphe apps. No need to reinstall when updating YouTube Morphe. +
+