Commit Graph

70 Commits (aec21d6f8fd11056456932f8fd0ab0b913e0ecde)

Author SHA1 Message Date
bl-ue dc690e38eb
render.py: fix typo (#5206) 2021-01-31 16:27:36 +00:00
Matthew Peveler 44472fb217
ci: add tldr-pages/tldr before commit hash for auto gh linking (#5072)
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
2021-01-03 21:48:47 +00:00
Matthew Peveler 549e69573b
remove duplicate pages/index.json file (#5063) 2021-01-02 09:53:39 -05:00
Kyle Anthony Williams f320863c9d Repaired indentation error. 2020-12-19 14:58:03 -05:00
Kyle Anthony Williams 6251e4eb3b Finished resolving of commits. 2020-12-18 22:52:07 -05:00
Kyle Anthony Williams f225e1a30a Merge remote-tracking branch 'upstream/master' 2020-12-18 22:38:17 -05:00
Starbeamrainbowlabs 5b5b590ee2
pdf script: format & add datetime (#4993) 2020-12-11 20:25:11 +00:00
Owen Voke 252271c35a ci: add PDF upload to deploy script 2020-12-04 18:48:24 +00:00
Kyle Anthony Williams 896555f79e Updated the render.py README.
* Updated command line usage to:
  * Reflect changes made to the CLI.
  * Demonstrate recommended use of pip.
* Made some grammar changes.
* Added more useful alt text to the images.
2020-12-04 12:09:48 -05:00
Kyle Anthony Williams 954ceb7b98 Made render.py more Pythonic.
* Converted the top comment to a multi-line string.
* Replaced `i` with `enumerate`.
* Gave the `ArgumentParser` a name and description.
* Added `basic` as a color choice and made it the default.
* Added `color` as a long flag.
* Removed no longer used variables and `if` statement.
2020-12-04 11:58:27 -05:00
Jamie Magee 34f8c610df
Checkout all branches in GitHub Actions (#4437)
By default actions/checkout@v2 only checks out the latest commit of the current branch. Unfortunately, this causes the `git diff` check in `check-pr.sh` to fail, as `master` branch isn't available`.

This change checks out all commits of all branches, which allows `git diff` to work correctly.

Ideally, I'd like to use the `ref` setting of actions/checkout@v2, but that only supports a single ref so it's not possible to checkout the PR branch _and_ `master` branch at the same time.
2020-10-05 16:23:08 +01:00
Owen Voke 68f8e470d1 Fix PULL_REQUEST_ID reference when not set 2020-06-26 18:55:59 +02:00
Owen Voke 7e3ca9c540 Resolve deploy key from secrets 2020-06-26 18:55:59 +02:00
Owen Voke 5e958f6074 Update scripts to use PULL_REQUEST_ID 2020-06-26 18:55:59 +02:00
Owen Voke 81d346f006 Replace 'TRAVIS_COMMIT_RANGE' usage 2020-06-26 18:55:59 +02:00
Owen Voke 7472600aa1 Update Travis references in scripts 2020-06-26 18:55:59 +02:00
Waldir Pimenta 37634b36f7 Harmonize project name (lowercase tldr, no semicolon, hyphen-separated) 2020-05-27 22:22:32 +02:00
Marco Bonelli c8291fdcfa Remove unnecessary newlines in send-to-bot messages. (#3754)
GitHub wraps text in comments even when a single newline is
encountered. This made comments by @tldr-bot look awkward.
2020-01-13 20:45:31 +01:00
Zlatan Vasović e2ae506613
Rework PDF script (#3654) 2019-12-17 21:25:52 +01:00
Marco Bonelli 359ada47c7 Scripts: use POSIX subcommand invocation 2019-11-29 16:01:25 +00:00
Marco Bonelli 4d153b7d8e test.sh: rename functions 2019-11-29 16:01:25 +00:00
Marco Bonelli 11ad7b5203 Check PR: optimize script 2019-11-29 16:01:25 +00:00
Marco Bonelli 2ae688016a Send to bot: rename script 2019-11-29 16:01:25 +00:00
Marco Bonelli 134e63f318 Send to bot: better action names, simplify endpoint 2019-11-29 16:01:25 +00:00
Marco Bonelli 581821448e Add check-pr script
This script will be run by Travis-CI (on PR builds only) to run some useful
checks. Refer to the comment at the top of the script for more information.
2019-11-29 16:01:25 +00:00
Marco Bonelli df8cae8c6f Update and refactor send_to_bot script
Refactor the script from top to bottom:

 1. Switch to Python 3.
 2. Add functionality for commenting only once (used for commenting messages
    generated by the check-pr script).
 3. Split the functionality clearly into two different actions: one for
    pr-check information, and one for build errors.
 4. Add additional env vars checks and error checks.
2019-11-29 16:01:25 +00:00
Marco Bonelli 7a28aef527 Copy index.json in build script, not npm script
Move the duplication of the index.json file in the build.sh script instead of
the npm build-index script. This makes things cleaner.
2019-11-29 16:01:25 +00:00
Marco Bonelli c2051a0674 Replace npm test with a proper bash script
The npm test script was dirty and had the unneeded side effect of generating an
output file. This change moves the test to a real bash script that runs the
appropriate tests and also additional checks when ran from Travis CI during a PR
build.
2019-11-29 16:01:25 +00:00
Agniva De Sarker 62731a8b64 Correctly store language and platform mappings together (#3588)
Previously they were stored separately in their own arrays.
This made them disconnected, and impossible to know if a page
belonged to which platform and language combination.

This PR adds an array of objects called `targets` which contains
platform/language pairs.
2019-11-19 18:58:23 +01:00
Marco Bonelli a188a3a8ca Travis: separate building from deployment.
- Added `-q` to the zip command to create the archive since Travis
  was having trouble handling its very long output (thus making
  the build fail).
- Moved the actual building of the index and the archive from
  deploy.sh to a new build.sh script.
- Added a `script` step in .travis.yml to run build.sh after npm
  test.
- Specified a clone depth of 1 in .travis.yml to make things faster
  since we don't need to do any git operation during the build.
2019-07-11 17:01:05 +05:30
Max Strübing 11289f8a9b [chore] fix use of doublequotes and $(...) notation in deploy script (#3048) 2019-05-23 14:27:29 +01:00
Marco Bonelli 697d8b3b78 deploy: use top-level index.json 2019-04-03 17:21:57 +05:30
Marco Bonelli 2fedf6ce96 build-index: add error check, fix regexp typo 2019-04-03 17:21:57 +05:30
Marco Bonelli e5d84c429b build-index: clean syntax 2019-04-03 17:21:57 +05:30
Marco Bonelli c3772f2345 Deploy: run all commands separately to avoid unnoticed errors. 2019-02-07 18:47:32 +01:00
Marco Bonelli d83f446a8c Cleaner deployment process (fixes #2749) (#2750)
* TravisCI: cleaner deployment process.

* TravisCI: rename deployment script.
2019-02-04 19:29:17 +05:30
Agniva De Sarker 1e28a0cbc0 [Security]: Moving to a secure way of uploading assets (#2747)
* [Security] Moving to a secure way of uploading assets
2019-02-03 14:57:35 +01:00
Agniva De Sarker d7f6df4ed7
Include languages in index file (#2696) 2019-01-10 13:52:44 +05:30
Agniva De Sarker 747ae04995 README: bring back old markdown syntax 2018-11-14 22:20:44 +00:00
Petrus Kiendys f8020369c3 Update readme
- notation fix, 'hyphen' --> 'colon'
- markdown fix, use double asterisk for "strong emphasis" instead of headers
2018-11-14 22:20:44 +00:00
Arun Isaac 6bfdbef312 TravisCI: include pages of all languages in archive (PR #2567) 2018-11-09 09:57:04 +00:00
Felix Yan d82202088f scripts: fix a typo (#2404) 2018-10-07 17:17:30 +05:30
pxgamer ce97ed1f7c scripts: fix import for urllib2 in python3 2018-08-26 21:16:50 +01:00
pxgamer fae6737841 scripts: add python3 compatibility for the bot 2018-08-26 21:16:50 +01:00
Agniva De Sarker b0906952ef tooling: remove old scripts to generate pdf
Now that a new tool has been checked in, therefore removing old one.
2018-03-12 19:08:33 +05:30
Ayush Dwivedi 490da5763d Render PDF copies of tldr pages (#1964) 2018-03-12 00:23:48 +05:30
Agniva De Sarker fa3828cf10 add documentation about Travis token (#1902) 2018-01-18 16:08:23 +00:00
Krishna Jangid 91938046f2 Update build.sh (#1483)
Made changes in line 36
2017-09-12 11:11:28 +01:00
HairyFotr e0ccb7147a Fix a few typos 2017-07-23 19:52:44 +05:30
Agniva De Sarker 6b8c3956ad Update message text 2017-05-22 20:34:26 +01:00