Petr Štetiar [Mon, 12 Oct 2020 05:22:10 +0000 (07:22 +0200)]
ci: remove superfluous before_script
The same commands are already inherited from parent job definition.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Moritz Warning [Sat, 10 Oct 2020 22:37:11 +0000 (00:37 +0200)]
tests: update for new texts
Moritz Warning [Fri, 9 Oct 2020 17:12:40 +0000 (19:12 +0200)]
i18n.js: improve texts
Petr Štetiar [Thu, 8 Oct 2020 20:36:34 +0000 (22:36 +0200)]
index.html: move to the new home
It should be preferred to use GitLab for issue reporting and merge
requests as we've some CI stuff already integrated.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Thu, 8 Oct 2020 20:35:19 +0000 (22:35 +0200)]
index.html: cleanup dead code
No need to keep it there.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Moritz Warning [Fri, 9 Oct 2020 17:11:11 +0000 (19:11 +0200)]
index.html: switch version/model field order
Paul Spooren [Thu, 8 Oct 2020 08:33:17 +0000 (22:33 -1000)]
enable default_version by default
Signed-off-by: Paul Spooren <mail@aparcar.org>
Paul Spooren [Wed, 7 Oct 2020 21:11:39 +0000 (11:11 -1000)]
automatically set default_version
This compares activated numeric versions and selects the latest one. Non
numeric versions are skipped, e.g. snapshots.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Petr Štetiar [Thu, 8 Oct 2020 07:20:07 +0000 (09:20 +0200)]
tests: test_spa: assure that selected version is stable release
We don't want users to use snapshots as default.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Moritz Warning [Mon, 28 Sep 2020 09:26:04 +0000 (11:26 +0200)]
misc/collect.py: move file check into update_conf
This makes the usage behavior more consistent across different call sites.
Moritz Warning [Mon, 28 Sep 2020 09:23:41 +0000 (11:23 +0200)]
misc/collect.py: cleanup www_path variable
Moritz Warning [Wed, 7 Oct 2020 16:25:42 +0000 (18:25 +0200)]
README.md: fix scrape command example
--download-url is not valid for scrape
Moritz Warning [Wed, 23 Sep 2020 18:36:52 +0000 (20:36 +0200)]
README.md: add documentation for {base} variable
Moritz Warning [Wed, 23 Sep 2020 18:44:08 +0000 (20:44 +0200)]
misc/collect.py: fixup type change of variable profiles
The type of the profiles variable changed from dict to list.
Moritz Warning [Thu, 17 Sep 2020 20:00:47 +0000 (22:00 +0200)]
misc/collect.py: introduce variable {base} to fix download_url
While scanning a directory for profile.json files of different releases,
the releases might be in different sub directories. But the collect.py
script only takes one download URL template for all overview.json files.
This commit introduces a variable {base} for the download URL parameter
that will be replaced by the sub directory that distinguish the location
of different release from each other.
Example path structure:
* ../tmp/releases/18.06.8/targets
* ../tmp/snapshot/targets
collect.py call:
```
./misc/collect.py scan "https://download.openwrt.org/{base}/{target}" ../tmp/ www/
```
In www/config.json:
```
versions: {'18.06.8': 'data/18.06.8/overview.json', 'SNAPSHOT': 'data/SNAPSHOT/overview.json'},
```
In www/data/18.06.8/overview.json:
```
"download_url": "https://download.openwrt.org/releases/18.06.8/targets/{target}",
```
In www/data/SNAPSHOT/overview.json:
```
"download_url": "https://download.openwrt.org/snapshots/targets/{target}"
```
Moritz Warning [Mon, 21 Sep 2020 15:00:15 +0000 (17:00 +0200)]
misc/collect.py: include build_date field for each device
Uses the last modified date of the profiles.json files.
Moritz Warning [Mon, 21 Sep 2020 14:21:15 +0000 (16:21 +0200)]
misc/collect.py: use list to collect profile.json data
This will help to store more information compared to a dict.
Moritz Warning [Thu, 17 Sep 2020 22:27:43 +0000 (00:27 +0200)]
www/index.js: allow deep linking
Update and handle the browser URL with version and device id to allow sharing of links.
Moritz Warning [Thu, 17 Sep 2020 22:26:26 +0000 (00:26 +0200)]
www/index.js: keep device selected across versions
The device id and model name may change across versions.
Moritz Warning [Thu, 17 Sep 2020 22:03:59 +0000 (00:03 +0200)]
www/index.js: deterministic version order and introduce default_version
Allow to set a preselected version and sort version, e.g.:
1. SNAPSHOT
2. 19.07.02
3. 19.07.01
Moritz Warning [Tue, 15 Sep 2020 01:17:30 +0000 (03:17 +0200)]
www/index.js: avoid use of c style for loop
Moritz Warning [Mon, 14 Sep 2020 23:22:03 +0000 (01:22 +0200)]
www/index.js: replace var by let and const
this is good ES6 practice
Petr Štetiar [Mon, 14 Sep 2020 10:12:19 +0000 (12:12 +0200)]
ci: deploy on tags as well
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Mon, 14 Sep 2020 06:06:25 +0000 (08:06 +0200)]
ci: populate GIT_VERSION variable in index.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Mon, 14 Sep 2020 06:00:19 +0000 (08:00 +0200)]
www/index.html: add proper project URL and add version variable
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Mon, 14 Sep 2020 05:08:51 +0000 (07:08 +0200)]
ci: add deploy steps
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Moritz Warning [Sun, 13 Sep 2020 20:01:50 +0000 (22:01 +0200)]
misc/collect.py: move out nested method to please linter
Moritz Warning [Sun, 13 Sep 2020 13:16:00 +0000 (15:16 +0200)]
misc/collect.py: rename TP-LINK to TP-LINK
This is a fix for the 19.07 releases and TP-Link devices. Those are in both ar71xx and ath79, but with a different vendor letter case.
Make the vendor equal so the code recognizes it and appends the target as extra differentiator.
Moritz Warning [Sun, 13 Sep 2020 13:02:38 +0000 (15:02 +0200)]
misc/collect.py: differentiate duplicate models by target
some devices might appear in different targets when migrating to new targets (e.g ar71xx and ath79)
Moritz Warning [Sun, 13 Sep 2020 12:37:48 +0000 (14:37 +0200)]
misc/collect.py: get release name from json files
instead of from directory names
Moritz Warning [Sun, 13 Sep 2020 11:31:43 +0000 (13:31 +0200)]
README.md: update and make more user friendly
Moritz Warning [Sun, 13 Sep 2020 12:20:29 +0000 (14:20 +0200)]
misc/collect.py: do not upper case the release name
Moritz Warning [Sun, 13 Sep 2020 11:35:46 +0000 (13:35 +0200)]
misc/collect.py: better error messages
adds a path and newlines to error messages
Moritz Warning [Sun, 13 Sep 2020 11:33:11 +0000 (13:33 +0200)]
misc/collect.py: add python version check
make sure the program is only executed by Python >=3.5.0
Petr Štetiar [Sun, 13 Sep 2020 09:10:52 +0000 (11:10 +0200)]
www/index.html: fix prettier warning
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Sun, 13 Sep 2020 08:48:23 +0000 (10:48 +0200)]
ci: add testing of collect.py scan method
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Sun, 13 Sep 2020 08:47:40 +0000 (10:47 +0200)]
tests: add snapshot profiles.json
So we could test collect.py scan method on CI.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Sun, 13 Sep 2020 09:14:44 +0000 (11:14 +0200)]
collect.py: fix open for Python versions < 3.6
The built-in open() function has been updated to accept os.PathLike
objects, as have all relevant functions in the os and os.path modules,
and most other functions and classes in the standard library.
Fixes following issue:
File "misc/collect.py", line 260, in scan
with open(ppath, "r", encoding='utf-8') as file:
TypeError: invalid file: PosixPath('tests/profiles/snapshots/targets/ipq806x/generic/profiles.json')
Ref: https://docs.python.org/3/whatsnew/3.6.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Sun, 13 Sep 2020 08:46:20 +0000 (10:46 +0200)]
collect.py: fix scan method file content decoding
Fixes following error:
File "misc/collect.py", line 54, in merge_profiles
obj = json.loads(content.decode("utf-8"))
AttributeError: 'str' object has no attribute 'decode'
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Fri, 21 Aug 2020 06:00:00 +0000 (08:00 +0200)]
ci: fix YAML dependency issue
Found errors in your .gitlab-ci.yml:
test site with selenium job: dependency build site for target environment is not defined in prior stages
Fixes: 53e7c4cd6919 ("ci: fix dependency for selenium test")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Moritz Warning [Thu, 20 Aug 2020 12:50:42 +0000 (14:50 +0200)]
add ca-certificates to test environment
Moritz Warning [Thu, 20 Aug 2020 11:39:20 +0000 (13:39 +0200)]
decode profiles.json content from bytes to string
Moritz Warning [Thu, 20 Aug 2020 09:34:34 +0000 (11:34 +0200)]
remove format string literals
the linter complains
Moritz Warning [Thu, 20 Aug 2020 09:00:39 +0000 (11:00 +0200)]
use required as member variable
'required' as argument is only available with python 3.7 and later
Moritz Warning [Thu, 20 Aug 2020 08:05:53 +0000 (10:05 +0200)]
use os.makedirs and remove redundant mkdir lines
Moritz Warning [Thu, 20 Aug 2020 01:32:08 +0000 (03:32 +0200)]
scan local folder for release and profiles.json files
E.g. ./collect.py scan downloads.openwrt.org /var/www/downloads.openwrt.org ../www/
Moritz Warning [Thu, 20 Aug 2020 01:30:46 +0000 (03:30 +0200)]
fix help text for scrape
Moritz Warning [Thu, 20 Aug 2020 01:29:07 +0000 (03:29 +0200)]
skip releases that have no profiles.json
Petr Štetiar [Thu, 20 Aug 2020 09:35:31 +0000 (11:35 +0200)]
ci: fix dependency for selenium test
The build directory should be passed from the target environment test.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Moritz Warning [Thu, 20 Aug 2020 08:33:43 +0000 (10:33 +0200)]
fix eslint errors
Moritz Warning [Thu, 20 Aug 2020 07:53:32 +0000 (09:53 +0200)]
excempt svg from html5validator
The error message refers to a missing 'lang' attribute of a non existing
html tag, both of which is not applicable to a svg file.
Moritz Warning [Thu, 20 Aug 2020 00:01:32 +0000 (02:01 +0200)]
remove safari specific attribute to please the linter
Moritz Warning [Wed, 19 Aug 2020 17:17:33 +0000 (19:17 +0200)]
img tag uses pixels without format
Petr Štetiar [Thu, 20 Aug 2020 06:40:57 +0000 (08:40 +0200)]
ci: pre-build with Python 3.6 as well
In order to spot possible compatibility issues before testing stage.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Thu, 6 Aug 2020 12:37:23 +0000 (14:37 +0200)]
ci: add site building and testing
To improve the QA.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Thu, 6 Aug 2020 11:55:04 +0000 (13:55 +0200)]
ci: add eslint and prettier check
Use opinionated code formatter `prettier` and `eslint` for static code
analysis of JavaScript code.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Thu, 6 Aug 2020 12:07:58 +0000 (14:07 +0200)]
www: reformat with prettier
Reformat the sources in www directory with the prettier tool.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Thu, 6 Aug 2020 09:04:04 +0000 (11:04 +0200)]
Add GitLab CI
For the start just simple Python (black+flake8), CSS, HTML and SVG
checking with html5validator.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Thu, 6 Aug 2020 08:46:10 +0000 (10:46 +0200)]
collect.py: add flake8 code style tool
Refactor the code in order to fix following flake8 errors:
misc/collect.py:55:1: E302 expected 2 blank lines, found 1
misc/collect.py:98:12: E713 test for membership should be 'not in'
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Thu, 6 Aug 2020 08:25:53 +0000 (10:25 +0200)]
collect.py: cleanup code
Remove commented out code.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Petr Štetiar [Thu, 6 Aug 2020 08:13:18 +0000 (10:13 +0200)]
collect.py: format with black
For automated unified code formatting.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Moritz Warning [Sun, 2 Aug 2020 13:50:53 +0000 (15:50 +0200)]
make code nicer in some places
Moritz Warning [Sun, 2 Aug 2020 10:21:14 +0000 (12:21 +0200)]
add comment
Moritz Warning [Fri, 31 Jul 2020 23:30:27 +0000 (01:30 +0200)]
collect.py cleanuo
Moritz Warning [Fri, 31 Jul 2020 23:19:05 +0000 (01:19 +0200)]
allow scraping via wget
much slower, but works better without this special feature:
https://downloads.openwrt.org/releases/19.07.3/targets/?json
Moritz Warning [Fri, 31 Jul 2020 13:20:54 +0000 (15:20 +0200)]
remove a word
Moritz Warning [Fri, 31 Jul 2020 13:09:07 +0000 (15:09 +0200)]
do no delete data folder
it might have data we want to keep
Moritz Warning [Fri, 31 Jul 2020 12:55:08 +0000 (14:55 +0200)]
allow collect.py script to script sites like downloads.openwrt.org
Moritz Warning [Fri, 31 Jul 2020 10:56:32 +0000 (12:56 +0200)]
use double quote for python code
Moritz Warning [Fri, 31 Jul 2020 00:02:00 +0000 (02:02 +0200)]
fix some query selectors
Moritz Warning [Thu, 30 Jul 2020 23:20:30 +0000 (01:20 +0200)]
allow different release codes
Moritz Warning [Thu, 30 Jul 2020 23:19:55 +0000 (01:19 +0200)]
use format strings
Moritz Warning [Thu, 2 Jul 2020 18:11:33 +0000 (20:11 +0200)]
rename images-title to build-title
Moritz Warning [Sun, 19 Jul 2020 20:10:49 +0000 (22:10 +0200)]
bump version to 2.2.2
Moritz Warning [Sun, 19 Jul 2020 20:10:02 +0000 (22:10 +0200)]
fix typo
Moritz Warning [Fri, 3 Jul 2020 09:10:31 +0000 (11:10 +0200)]
Merge branch 'master' of github.com:mwarning/yet_another_firmware_selector
Moritz Warning [Tue, 30 Jun 2020 20:22:56 +0000 (22:22 +0200)]
use document.querySelector
Moritz Warning [Thu, 25 Jun 2020 18:54:53 +0000 (20:54 +0200)]
rename url => download_url (#51)
this is more descriptive about the url is used for
Moritz Warning [Thu, 25 Jun 2020 16:48:51 +0000 (18:48 +0200)]
fix renamed json file in example
Moritz Warning [Fri, 19 Jun 2020 15:58:28 +0000 (17:58 +0200)]
use svg logo
Moritz Warning [Fri, 19 Jun 2020 14:19:13 +0000 (16:19 +0200)]
ignore underscore, hyphen and dot in match
Moritz Warning [Thu, 18 Jun 2020 13:57:27 +0000 (15:57 +0200)]
update website link
Moritz Warning [Wed, 17 Jun 2020 10:30:12 +0000 (12:30 +0200)]
add mobile support
Moritz Warning [Wed, 17 Jun 2020 15:34:39 +0000 (17:34 +0200)]
inherit color for all links
meant for build log and YAFS website link
Moritz Warning [Tue, 16 Jun 2020 20:02:05 +0000 (22:02 +0200)]
move web content to www folder
This makes a better separation of actual content and meta data (readme, license, etc.) much better.
Moritz Warning [Tue, 16 Jun 2020 15:50:51 +0000 (17:50 +0200)]
bump version to 2.2.1
Moritz Warning [Tue, 16 Jun 2020 15:49:11 +0000 (17:49 +0200)]
typo: asa => asu
Moritz Warning [Tue, 16 Jun 2020 14:36:00 +0000 (16:36 +0200)]
use inherited color for link to build log
Moritz Warning [Fri, 12 Jun 2020 20:36:26 +0000 (22:36 +0200)]
show asu build log for build success
Moritz Warning [Sun, 14 Jun 2020 22:08:46 +0000 (00:08 +0200)]
fix indentation
Moritz Warning [Sun, 14 Jun 2020 22:07:11 +0000 (00:07 +0200)]
forgot asu_url as url prefix
this makes it work with chef.libremesh.org again
Moritz Warning [Fri, 12 Jun 2020 20:04:05 +0000 (22:04 +0200)]
rename profiles.json to overview.json (#45)
For the basic use case, the URLs in config.js are explicit file paths.
For ASU, this is expected to be the base URL of the ASU API.
Moritz Warning [Mon, 8 Jun 2020 18:18:50 +0000 (20:18 +0200)]
Merge branch 'master' of github.com:mwarning/yet_another_firmware_selector
Moritz Warning [Mon, 8 Jun 2020 18:15:03 +0000 (20:15 +0200)]
use profiles.json file name in documentation
Moritz Warning [Sun, 7 Jun 2020 11:21:41 +0000 (13:21 +0200)]
Merge pull request #38 from mwarning/limit_packages
limit packet list selection
Moritz Warning [Sun, 7 Jun 2020 01:40:21 +0000 (03:40 +0200)]
limit packet list selection
the packet list can only contain unique items from the package index, a minus in front of a packet is allowed
Signed-off-by: Moritz Warning <moritzwarning@web.de>
Moritz Warning [Sat, 6 Jun 2020 11:26:24 +0000 (13:26 +0200)]
Merge pull request #37 from aparcar/asu2
fix autocomplete + buildate, move exampels
Paul Spooren [Sat, 6 Jun 2020 08:41:21 +0000 (22:41 -1000)]
fix autocomplete + buildate, move exampels
autocomplete never worked because of wrong files naming. The package
index file is called `index.json` and now available on the ASU server.
The build date never worked for images created by the official OpenWrt
build bots, fixed by reading the `last-modified` header.
Examples files are now in their own folders to follow the structure of
ASU, which offers not only profiles but also package information in the
version folders.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Moritz Warning [Fri, 5 Jun 2020 21:10:00 +0000 (23:10 +0200)]
remove openwrt.org specific paths
this would require every json file input to include an url value
Moritz Warning [Wed, 3 Jun 2020 10:44:23 +0000 (12:44 +0200)]
fix typo