178 Commits

Author SHA1 Message Date
David Rodríguez
36ac5dc44e Let reviewdog use github-pr-annotation formatter
This is already the default for forked PRs, and most (if not all) PRs to
this repository come from forks anyways.
2025-11-13 20:39:09 +01:00
Maikel
7c4714288d Merge pull request #13675 from deivid-rodriguez/unify-linters
Unify linters and linter related tools
2025-11-10 16:24:36 +11:00
David Rodríguez
8f07ee5bf7 Move haml-lint from hound to reviewdog
We can somewhat easily get it passing and integrate nice with reviewdog
by adding a TODO file for the rules that we had enabled, so that we
don't need to correct anything now, but we still get alerted for new
offenses. So I say let's keep it and enforce it from now on.
2025-11-05 10:08:03 +01:00
David Rodríguez
43da235d15 Make sure all linters run even if some of them fails 2025-11-05 10:08:03 +01:00
David Cook
ba3553854e Allow script to continue if you've already deleted the old files 2025-11-04 15:17:45 +00:00
David Rodríguez
e90569bdcc Adjust error format to latest prettier output
To avoid generating an unnecessary annotation.
2025-10-29 11:55:11 +01:00
David Rodríguez
404e27ab71 Run reviewdog directly
So that we can control the version we run without depending on external
actions, and so that we use a consistent version for all linters.

At the same time, unify to running the latest version of reviewdog,
0.21.0, which also involves changing the deprecated `fail_on_error` flag
previously used by prettier action to `fail_level`.
2025-10-29 11:55:10 +01:00
David Rodríguez
6a226e476d Link to Stripe testing wiki page from the cassette regeneration script
I think this is the more relevant wiki page for someone looking into
regenerating cassettes.

Also, no need to mention bitwarden explicitly, the wiki page already
explains everything.
2025-10-21 14:38:10 +02:00
Maikel Linke
ef98e4e384 Delete old, unused script 2025-02-17 12:25:59 +11:00
Maikel Linke
8bfbb74bf3 Pass any option to rubocop 2025-02-04 16:13:24 +11:00
Maikel Linke
b9bff1598d Add option to define your own rubocop command
In development, you may choose to use this script in your Git pre-commit hook.
Then you want the fastest possible execution to not be delayed in your
Git operations. While the default is the safest option, you can now
define your own optimised command to avoid loading the whole Rails app
environment.
2025-02-04 15:59:58 +11:00
Maikel Linke
18ec97992d Remove unneeded HAML upgrade script
We updated a long time ago and I now copied those scripts to a Gist to
share with others:

* https://gist.github.com/mkllnk/bab2d474d686a2e3b88914129aee63e1
2025-01-15 12:55:13 +11:00
Maikel
b9483ce63d Update script/rbenv-install.sh
Co-authored-by: David Cook <david@redcliffs.net>
2024-12-17 11:51:47 +11:00
Maikel Linke
8d1d0c27c9 Install rbenv automatically if missing
This small script addition will allow us to remove the rbenv
installation from our Ansible provisioning scripts.
2024-12-12 17:15:53 +11:00
Maikel Linke
3f353690c7 Load staging baseline even if db in use 2024-10-29 12:44:46 +11:00
Maikel Linke
8a0d9d99e5 Add scripts to save and restore baseline data 2024-10-25 15:07:39 +11:00
Maikel Linke
decf1e6f03 Move old Buildkite scripts to archive folder
We could delete them all but I want use some of their wisdom for new CI
scripts.
2024-10-25 14:23:33 +11:00
Pauloparakleto
80db511fe5 remove rvm script. It is called directly in script/setup 2024-03-27 10:11:21 -03:00
Pauloparakleto
3a2cb3e415 call rvm directly 2024-03-27 10:11:21 -03:00
David Cook
15c93a8e95 Add -v flag to avoid script exit 2024-03-27 10:11:21 -03:00
David Cook
4a4135f261 Simplify condition, in favour of rbenv
If rbenv is installed, we'll favour that because that's what is currently supported.
2024-03-27 10:11:21 -03:00
Pauloparakleto
1d6323c520 chore(script/rvm-install): Add support to RVM. Use rvm command to install ruby version in variable.
RVM already print the logs. No need to printf message here.
RVM already skip installation if already done with logs.
2024-03-27 10:10:21 -03:00
Pauloparakleto
8b591b7d21 chore(script/setup): Add support to RVM. Only evaluate to rbenv if rvm path is not found. 2024-03-27 10:08:50 -03:00
David Cook
98457b2fff Merge pull request #12248 from mkllnk/rubocop-precommit
Add dev script to run rubocop on changed files
2024-03-13 14:59:29 +11:00
Maikel Linke
1472749da8 Add dev script to run rubocop on changed files 2024-03-07 13:43:52 +11:00
Maikel Linke
4516d90ede Add script to upgrade HAML syntax
[skip-ci]
2024-02-22 15:01:13 +11:00
Maikel Linke
28309c1910 (Semi-)automatically commit new Stripe recordings
This script is used by a developer whenever the Stripe gem is bumped by
Dependabot. I found myself always doing the same commands and thought
that they could be automated.

I'm not going as far as pushing back to the branch but we might do that
in the future?
2024-02-14 13:54:38 +11:00
David Cook
e228ad0326 Exit if any command fails
If the working directory is dirty, git rm might fail.
2024-02-08 14:53:51 +00:00
Maikel Linke
09a24b0f1f Prompt for nodenv when missing
The setup script would display several error messages and continue
running. Now the user is guided to the right solution.
2024-01-25 10:57:38 +11:00
Maikel
08ca85250a Merge pull request #12018 from openfoodfoundation/dependabot/bundler/stripe-10.5.0
Bump stripe from 10.3.0 to 10.5.0
2024-01-18 12:41:17 +11:00
Gaetan Craig-Riou
4b0e5ee7b6 Update all locales with the latest Transifex translations 2024-01-17 16:23:08 +11:00
Gaetan Craig-Riou
2a9731f886 Reverse commenting out git status --porcelain
It was wrongly commented out in this commit:
7c9d4f1342
2024-01-17 16:20:43 +11:00
David Cook
d7bb3b77a7 Add comment
We really need to update our documentation more, but this is better than nothing.
2024-01-17 15:14:44 +11:00
Gaetan Craig-Riou
7c9d4f1342 Update all locales with the latest Transifex translations 2023-12-01 11:22:35 +11:00
Maikel Linke
777060ea6b Remove old script
We use Github to draft releases these days.
2023-11-24 14:22:42 +11:00
Gaetan Craig-Riou
06a4cbafd4 Merge pull request #11788 from dacook/release-scripts
Add script for preparing translations
2023-11-10 13:56:04 +11:00
David Cook
0c6608f828 Add comments 2023-11-10 11:46:48 +11:00
David Cook
f754eac3a0 Add script for preparing translations 2023-11-09 17:42:09 +11:00
Maikel Linke
cb57807466 Streamline stripe test recording updates 2023-11-09 08:52:06 +11:00
Maikel Linke
7dd0d0581c Codify re-recording of Stripe cassettes 2023-11-08 15:05:54 +11:00
David Cook
4eb169ea0d Add a shortcut to draft new release
Next time, we can add a script to randomly choose a food-related release name ;)
2023-10-13 11:30:25 +11:00
Maikel Linke
74a8b1e721 Add script to create patch release tags 2023-10-06 13:58:37 +11:00
Neal Chambers
0d2e2fa42c Add skip for cops that couldn't be autocorrected 2023-08-02 09:11:00 +09:00
Maikel Linke
5a4efdbce3 Separate DFC API swagger config
This allows us to run the specs separately to generate the
documentation. It's more efficient this way and the separate swagger doc
file is easier to read.

The engine-specific swagger helper also allows us to simplify the spec
files.

Added an exception to our styleguide because it's intended and useful to
have a complete (lengthy) description of the API in one block.
2023-07-03 12:37:23 +10:00
Maikel Linke
db77d1591c Add test examples to DFC API documentation
In other API specs, you provide example values in the schema. So the
specs contain examples which can be used for the documentation. But
instead of defining example data separately, we can use the generated
data by the specs. This way we document real output and don't have to
double up on documentation.

Note that we don't have schema definitions for the DFC API yet. And it
wouldn't make sense to replicate the DFC Ontology manually in JSON
Schema for this purpose. The DFC Connector ensures already that we
comply with the ontology. But I hope that we can use a tool at some
point to generate JSON Schema from the DFC Ontology which would add more
detail to the Swagger docs, I think.
2023-06-28 13:50:54 +10:00
Maikel Linke
de51a7833d Add script to swaggerize DFC API in its engine
Rswag doesn't look for specs in engines by default. We haven't added any
Rswag specs in the dfc_provider engine yet but that will come.

The generated API schema has some superfluous whitespace removed due to
a fix in the rswag gems.
2023-06-28 13:50:54 +10:00
Maikel Linke
de8f5e13b3 Explain gotcha in case it breaks one day 2023-04-24 09:39:21 +10:00
Maikel Linke
1955a6719c Fix commit message formatting
Git needs a blank line between the summary and the longer description.
And `echo` doesn't interpret `\n` by default.
2023-04-20 11:19:32 +10:00
Maikel Linke
f71e5ee43c Limit number of rubocop autocorrect runs
The typical use case is to create a small number of commits for a pull
request to ease the review. And you can still run it for all cops with
`-n 999` or `-n -0`.
2023-04-20 11:19:32 +10:00
Maikel Linke
0ac2358f2c Regenerate Rubocop's TODO file without timestamp 2023-04-20 10:34:35 +10:00