Skip to content

Commit

Permalink
Refactor build system, simplify templates and escape macros in code
Browse files Browse the repository at this point in the history
Refactor build system into several modules:
- `settings.py`: to provide common settings (from `buildsettings.py` / `localbuildsettings.py`)
- `build_plugin.py`: to build single plugin
  formats userscript metablock, preprocesses sources - makes templates substitutions,
  inlines dependencies js/css/img - and wraps into wrapper (from `pluginwrapper.py`)
- `build_mobile.py`: to build android apk (embedding scripts from given directory)
- `build.py`: to build all: main IITC script, all plugins, and (optionally) Android apk.

Each module can be used independently as cli utility.

Escape macros in code in order to keep js-validity, fix IITC-CE#50.
Simplify userscripts source template, completely get rid of these ugly substitutions:
- `@@MetaInfo@@`
- `@@PLUGINSTART@@`
- `@@PLUGINEND@@`
- `.@@DATETIMEVERSION@@`
- `[@@Buildname@@-@@BUILDDATE@@]`

Rename plugin sources:  `*.user.js` -> `*.js`

Close IITC-CE#150: use template from settings instead of url harcoding.

Close IITC-CE#99: remove timestamp component from `version` of Release scripts.
  • Loading branch information
johndoe committed Nov 17, 2019
1 parent aad5053 commit 2a468ec
Show file tree
Hide file tree
Showing 80 changed files with 979 additions and 1,337 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -39,9 +39,8 @@ before_script:
- ssh-add /tmp/deploy_rsa

script:
- wget https://iitc.modos189.ru/deploy/$BUILD_TYPE/localbuildsettings.py
- wget https://iitc.modos189.ru/deploy/localbuildsettings.py
- ./build.py $BUILD_TYPE
- ./build.py mobile

deploy:
provider: releases
Expand Down

0 comments on commit 2a468ec

Please sign in to comment.