-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up, fix normalize urls and new makefile #1
Conversation
It also removes 4chan X builds besides one ( That explains the -50K diff ) |
if (process.argv.includes('-crx')) { | ||
const crxDir = resolve(buildDir, 'crx'); | ||
await bundle.write({ | ||
...sharedBundleOpts, | ||
banner: license, | ||
file: resolve(crxDir, 'script.js'), | ||
}); | ||
await copyFile(resolve(__dirname, '../src/meta/eventPage.js'), resolve(crxDir, 'eventPage.js')); | ||
writeFile(resolve(crxDir, 'manifest.json'), generateManifestJson(packageJson, version, channel)); | ||
for (const file of ['icon16.png', 'icon48.png', 'icon128.png']) { | ||
await copyFile(resolve(__dirname, '../src/meta/', file), resolve(crxDir, file)); | ||
};} | ||
})(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use VS Code for this project.
But i'm pretty sure its intentional, its when you add the arument -crx
it makes the crx folder.
Just tested it and it works as intended. Its so you can choose what to install, either the userscript and or crx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo -> $@ | ||
|
||
.events2/push-web : .git/refs/heads/$(meta_distBranch) | .events2 distready | ||
git push web --tags -f | ||
git push web $(meta_distBranch) | ||
echo -> $@ | ||
|
||
.events2/push-store : .git/refs/tags/stable | .events2 distready | ||
node tools/webstore.js | ||
echo -> $@ | ||
|
||
.SECONDARY : | ||
|
||
.PHONY: default all distready script crx release jshint install push $(npgoals) | ||
|
||
script : $(script) | ||
|
||
crx : $(crx) | ||
|
||
release : $(release) | ||
|
||
jshint : .events/jshint | ||
|
||
install : .events/install | ||
|
||
push : .events2/push-git .events2/push-web .events2/push-store | ||
|
||
clean : | ||
$(RMDIR) tmp tmp-crx testbuilds .events | ||
$(RM) .tests_enabled | ||
|
||
cleanrel : clean | ||
$(RMDIR) builds | ||
|
||
cleanweb : | ||
$(RM) test.html | ||
|
||
cleanfull : clean cleanweb | ||
$(RMDIR) .events2 dist node_modules | ||
git worktree prune | ||
|
||
withtests : | ||
echo true> .tests_enabled | ||
-$(MAKE) | ||
echo false> .tests_enabled | ||
|
||
archives : | ||
git fetch -n archives | ||
git merge --no-commit -s ours archives/gh-pages | ||
git show archives/gh-pages:archives.json > src/Archive/archives.json | ||
-git commit -am 'Update archive list.' | ||
|
||
$(foreach i,1 2 3 4,bump$(i)) : | ||
$(MAKE) archives | ||
node tools/bump.js $(subst bump,,$@) | ||
$(MAKE) .events/CHANGELOG | ||
$(MAKE) all | ||
|
||
tag : | ||
git add builds | ||
$(MAKE) cleanrel | ||
$(MAKE) all | ||
git diff --quiet -- builds | ||
$(MAKE) tagcommit | ||
|
||
tagcommit : | ||
git commit -am "Release $(meta_name) v$(version)." | ||
git tag -a $(version) -m "$(meta_name) v$(version)." | ||
|
||
beta : distready | ||
git tag -af beta -m "$(meta_name) v$(version)." | ||
cd dist && git merge --no-commit -s ours beta | ||
cd dist && git checkout beta "builds/*-beta.*" img .gitignore .gitattributes | ||
cd dist && git commit -am "Move $(meta_name) v$(version) to beta channel." | ||
|
||
stable : distready | ||
git push . HEAD:bstable | ||
git tag -af stable -m "$(meta_name) v$(version)." | ||
cd dist && git merge --no-commit -s ours stable | ||
cd dist && git checkout stable "builds/$(name).*" builds/updates.xml builds/updates.json | ||
cd dist && git commit -am "Move $(meta_name) v$(version) to stable channel." | ||
|
||
web : index.html distready | ||
-git commit -am "Build web page." | ||
cd dist && git merge --no-commit -s ours master | ||
cd dist && git checkout master README.md index.html web.css img .gitignore .gitattributes | ||
cd dist && git commit -am "Update web page." | ||
|
||
update : | ||
$(RM) package-lock.json | ||
# Updates npm packages | ||
update: | ||
@echo "Updating the repository..." | ||
npm install --save-dev $(shell node tools/unpinned.js) | ||
npm install | ||
|
||
updatehard : | ||
$(RM) package-lock.json | ||
npm install --save-dev $(shell node tools/unpinned.js latest) | ||
npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry mate, but I can't merge a PR that removes functionality without providing an alternative. Like mentioned in ccd0#3341 (comment), this makefile also including code to update their webpage, which I don't want do delete in my upstream PR.
Also, moving the few files that weren't affected by the migration around is also something I don't want in the upstream PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understandable, I'm changing back to only bug fixes and so on. My idea was that it would be rewritten or added on if it still was needed due to all of the bloat that i felt was in there, I will see if i can revert the commits
Clean up
.jshintrc index.html template.jst version.json web.css
to a new folder calledmisc
Normalize urls
new Makefile and build functions
npm run build:script
Builds only the scriptnpm run build:crx
builds only the crxnpm run build
builds bothtestbuilds
againstable
will move the build files to the folderbuilds
It does not build the
.crx
file yet but i'm not sure if we should do that, uBlock origin does not do it and adding a chrome extension from source is normally done underchrome://extensions
at "Load unpacked"