Skip to content

Commit

Permalink
Merge pull request #8 from yomidevs/uncurse
Browse files Browse the repository at this point in the history
try to slowly uncurse/unbreak this build process
  • Loading branch information
djahandarie authored Dec 29, 2024
2 parents 136cf60 + a8c76b6 commit 6a85b8c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8,853 deletions.
30 changes: 6 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Download dependencies and build a combined, minified source for release

on:
push:
branches:
- main

jobs:
build:
Expand All @@ -16,6 +14,7 @@ jobs:
- name: Install dependencies
run: |
npm install
mkdir lib dist
mv node_modules/dexie/dist/dexie.js lib/dexie.js
mv node_modules/dexie-export-import/dist/dexie-export-import.js lib/dexie-export-import.js
mv node_modules/downloadjs/download.js lib/download.js
Expand All @@ -24,25 +23,8 @@ jobs:
run: |
npm run build
- name: Remove node_modules
run:
rm -rf node_modules

- name: Commit source to main branch
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
echo `date` > .last_built_on
git add . -A
git commit -m "Minify and combine dependencies as of $(date +%s)."
git push
- name: Commit minified dependencies to release branch
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git fetch
git checkout release
git checkout ${GITHUB_REF##*/} dist/yomichan-data-exporter.min.js .last_built_on
git commit -am "Release minified and combined dependencies as of $(date +%s)."
git push origin release
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/yomichan-data-exporter.min.js
1 change: 0 additions & 1 deletion .last_built_on

This file was deleted.

6 changes: 3 additions & 3 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ to that end.
+ Paste the following into the console and wait for the export + download to
finish:
#+begin_src js
fetch("https://raw.githubusercontent.com/yomidevs/yomichan-data-exporter/release/dist/yomichan-data-exporter.min.js")
fetch("https://raw.githubusercontent.com/yomidevs/yomichan-data-exporter/releases/latest/yomichan-data-exporter.min.js")
.then((resp) => resp.text())
.then((srcText) => {
eval(srcText);
Expand All @@ -50,11 +50,11 @@ fetch("https://raw.githubusercontent.com/yomidevs/yomichan-data-exporter/release
+ Unfortunately(?!), Yomichan released on Chrome doesn't have permission to
actually inject code (I tried a whole bunch of different approaches and the
permissions are just lacking) so you are going to have to paste the contents
of the [[https://raw.githubusercontent.com/yomidevs/yomichan-data-exporter/release/dist/yomichan-data-exporter.min.js][exporter code]] into the console.
of the [[https://raw.githubusercontent.com/yomidevs/yomichan-data-exporter/releases/latest/yomichan-data-exporter.min.js][exporter code]] into the console.

It is a very long "one-liner" and apparently github is pretty bad at handling
all of it being put into a code box so you may want to open the raw file,
select all, then copy and paste into the console. [[https://raw.githubusercontent.com/yomidevs/yomichan-data-exporter/release/dist/yomichan-data-exporter.min.js][Link to the raw]].
select all, then copy and paste into the console. [[https://raw.githubusercontent.com/yomidevs/yomichan-data-exporter/releases/latest/yomichan-data-exporter.min.js][Link to the raw]].

+ Finally, paste the following into the console and wait for the export +
download to finish:
Expand Down
Empty file removed dist/.gitkeep
Empty file.
1 change: 0 additions & 1 deletion dist/yomichan-data-exporter.min.js

This file was deleted.

Empty file removed lib/.gitkeep
Empty file.
Loading

0 comments on commit 6a85b8c

Please sign in to comment.