Commit Graph

519 Commits

Author SHA1 Message Date
Yuri Astrakhan
e16c76e3c3 Inline all format arguments where possible
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.

The change was automatically created with, so there are far less change
of an accidental typo.

```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Yuri Astrakhan
ec55dd1d7b Minor manual cleanu
* use default derive
* use `strip_prefix` where possible to avoid dup work
2022-12-23 03:11:53 -05:00
bors
3c00b19b0a Auto merge of #13771 - noritada:feature/release-notes-on-github-releases, r=lnicola
Add xtask for publishing release notes in Markdown on GitHub Releases from a changelog in AsciiDoc

This PR provides `xtask publish-release-notes` to convert a changelog written in AsciiDoc to Markdown and update descriptions (release notes) of a corresponding entry on GitHub Releases.

This AsciiDoc parser is not capable of processing every AsciiDoc document, but I have surveyed a set of existing changelog entries and have confirmed that the following notations used can be converted properly. In the future, I would like to improve the parser to accept any AsciiDoc.  Alternatively, the parser could be moved out of the project.

Your feedback would be appreciated!

Closes #13191

### Supported AsciiDoc syntax

many occurrences
- [x] documentation header
- [x] section header
- [x] `*`-prefixed basic unordered single level list item
- [x] list continuation using `+`
- [x] block image macro `image::...[]` with empty alt
- [x] block image macro `image::...[]` with non-empty alt
- [x] block video marco `video::...[]` with `options=loop`
- [x] inline hard line break `+`
- [x] inline custom macro `commit:...[]`
- [x] inline custom macro `release:...[]`
- [x] inline custom macro `pr:...[]`
- [x] inline unconstrained bold text `**...**`
- [x] inline constrained monospace ``` `...`  ```

[thisweek/_posts/2019-07-24-changelog-0.adoc](https://github.com/rust-analyzer/rust-analyzer.github.io/tree/src/thisweek/_posts#:~:text=2019%2D07%2D24%2Dchangelog%2D0.adoc)
- [x] paragraphs
- [x] mixture of `*` and `-` for unordered list item prefix
- [x] inline external link `https://...[]`

[thisweek/_posts/2020-01-13-changelog-7.adoc](https://github.com/rust-analyzer/rust-analyzer.github.io/tree/src/thisweek/_posts#:~:text=2020%2D01%2D13%2Dchangelog%2D7.adoc)
- [x] list item with multiline principal text with indent
- [x] inline image macro `image:...[]`

[thisweek/_posts/2020-03-02-changelog-14.adoc](https://github.com/rust-analyzer/rust-analyzer.github.io/blob/src/thisweek/_posts/2020-03-02-changelog-14.adoc)
- [x] empty lines between list items
- [x] nested unordered list item with `**`
- [x] inline macro `kbd:[...]`

[thisweek/_posts/2020-03-16-changelog-16.adoc](https://github.com/rust-analyzer/rust-analyzer.github.io/blob/src/thisweek/_posts/2020-03-16-changelog-16.adoc)
- [x] `[source]`-prefixed listing

[thisweek/_posts/2020-04-06-changelog-19.adoc](https://github.com/rust-analyzer/rust-analyzer.github.io/blob/src/thisweek/_posts/2020-04-06-changelog-19.adoc)
- [x] list item with multiline principal text without indent
- [x] `[source,lang]`-prefixed listing
- [x] `.`-prefiexed ordered list item
- [x] list item immediately after list continuation paragraph without an empty line in between

[thisweek/_posts/2020-04-20-changelog-21.adoc](https://github.com/rust-analyzer/rust-analyzer.github.io/blob/src/thisweek/_posts/2020-04-20-changelog-21.adoc)
- [x] title line for block image

[thisweek/_posts/2020-12-21-changelog-56.adoc](https://github.com/rust-analyzer/rust-analyzer.github.io/blob/src/thisweek/_posts/2020-12-21-changelog-56.adoc)
- [x] block video `video::...[]` with `options="autoplay,loop"`
2022-12-21 18:37:10 +00:00
Noritada Kobayashi
fccc094712 Make minor improvements and cleanups 2022-12-15 14:52:23 +09:00
Noritada Kobayashi
0c6fd4dbe5 Split the input/output data of the conversion from the test code to the respective files 2022-12-15 14:25:59 +09:00
Noritada Kobayashi
37b404d6c6 minor: Set the experimental AsciiDoc document attribute to generated draft changelog
The keyboard macro (`kbd:[...]`) requires this attribute.

This default change will prevent issues like
https://github.com/rust-analyzer/rust-analyzer.github.io/pull/191 .
2022-12-14 18:49:26 +09:00
Noritada Kobayashi
c78d759ab3 Add a link to the original changelog from release notes on GitHub Releases 2022-12-14 14:14:55 +09:00
Noritada Kobayashi
fd5be91d94 Integrate inline macro support with the main AsciiDoc-to-Markdown conversion process 2022-12-14 13:33:20 +09:00
Noritada Kobayashi
a77336b1aa Implement inline macro handling for AsciiDoc-to-Markdown conversion 2022-12-14 02:12:24 +09:00
Noritada Kobayashi
c7c6c6b814 Make curl fail on errors in xtask publish-release-notes 2022-12-13 13:05:11 +09:00
Noritada Kobayashi
86621a7cc0 Correct complex list item support in AsciiDoc-to-Markdown conversion
Support for following cases are added:

- newlines between list items
- list item with multiline principal text with or without indent
- list item immediately after a list continuation paragraph without
  empty lines in between
2022-12-12 13:09:18 +09:00
Noritada Kobayashi
f06a29f6e1 Implement xtask publish-release-notes to publish release notes on GitHub Releases 2022-12-11 23:49:28 +09:00
Noritada Kobayashi
0eb537fa31 Add support for list nesting in AsciiDoc-to-Markdown conversion
Support for following list item types are also added:

  - `-`-prefixed unordered list items
  - `.`-prefixed ordered list items
2022-12-11 14:58:49 +09:00
Noritada Kobayashi
240fc255ef Add image/video media support in AsciiDoc-to-Markdown conversion 2022-12-10 18:22:57 +09:00
Noritada Kobayashi
1efcb6ad9a Import the initial implementation of AsciiDoc-to-Markdown conversion 2022-12-09 23:45:45 +09:00
Aleksey Kladov
39fa8b5c39 internal: ⬆️ xflags
The main change here should be that flags are not inhereted, so

   $ rust-analyzer analysis-stats . -v -v

would do what it should do

We also no longer Don\'t
2022-10-08 15:35:07 +01:00
Laurențiu Nicola
9a447c04f6 Use the release branch in xtask promote 2022-08-03 09:48:44 +03:00
Laurențiu Nicola
58c3a5634f Update xtask promote and release instructions 2022-07-31 20:26:35 +03:00
Amos Wenger
23d25a3094 Enable extra warnings required by rust-lang/rust 2022-07-20 15:00:17 +02:00
Lukas Wirth
ec51dcbbc7 fix: Set server binary version when distributing 2022-07-13 13:34:04 +02:00
Jonas Schievink
6c6ae965ba Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
Laurențiu Nicola
e48ed5316f internal: Handle fractional release numbers in changelog naming 2022-06-18 17:00:28 +03:00
Lukas Wirth
a2a3ea86ea Bring the version command output in line with other rust tools 2022-06-02 18:36:02 +02:00
Jonas Schievink
21b6ce8b8e Bump extension version 2022-05-17 16:02:07 +02:00
Laurențiu Nicola
7093356a98 Fix crate names 2022-05-02 11:41:06 +03:00
Laurențiu Nicola
d4dcb16a02 Fix changelog generation after repo move 2022-04-19 09:08:39 +03:00
bors[bot]
3bff42fd14
Merge #11734
11734: internal: Bump `xshell` and fix `dist` r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2022-03-17 06:54:27 +00:00
Laurențiu Nicola
be6d5001e4 Bump xshell and fix dist 2022-03-17 08:53:33 +02:00
Laurențiu Nicola
8f99c93f0f Fix metrics.json path 2022-03-16 18:43:56 +02:00
Lukas Wirth
46008d4cf4 minor: unblock metrics 2022-03-16 12:11:21 +01:00
Aleksey Kladov
56e43c34e7 ⬆️ xshell 2022-03-14 14:57:24 +00:00
Laurențiu Nicola
a87e67360c Fix package.json replacement 2022-03-08 08:34:03 +02:00
Lukas Wirth
d425c5b534 fix: client distribution string replacement looking for wrong key 2022-03-08 02:32:35 +01:00
Laurențiu Nicola
3bb0635780 Update url to make webrender build 2022-02-26 11:56:57 +02:00
Florian Diebold
f807ccd6c0 Add CSV output to analysis-stats
For easy diffing.
2022-02-25 11:45:44 +01:00
Laurențiu Nicola
e3f951848f Use the same displayName for pre-release versions 2021-12-22 10:27:40 +02:00
Laurențiu Nicola
c9175dc0f1 Disable unstable APIs for nightly releases 2021-12-22 09:20:46 +02:00
Laurențiu Nicola
9c74f646f4 Publish platform-specific Code VSIXes 2021-12-18 22:49:11 +02:00
Jonas Schievink
03188e63cc Pull website before generating new changelog 2021-11-22 14:45:47 +01:00
Jonas Schievink
be8d40a13e Set upstream branch when promoting 2021-11-22 13:39:07 +01:00
Aramis Razzaghipour
16d38ec8b8
Use .into_iter() method on array to avoid dereference 2021-11-03 16:13:47 +11:00
Laurențiu Nicola
8457ae34bd Set MSRV 2021-10-23 15:07:11 +03:00
Lukas Wirth
1294bfce86 Migrate to edition 2021 2021-10-21 20:10:40 +02:00
Aramis Razzaghipour
eff195852d
Fix miscellaneous Clippy lints 2021-10-03 23:53:30 +11:00
Aramis Razzaghipour
55c0b86cde
Add semicolons for consistency
`clippy::semicolon_if_nothing_returned`
2021-10-03 23:39:43 +11:00
Laurențiu Nicola
b66e506cc2 Don't spam the manual with warnings 2021-09-13 10:56:14 +03:00
Aleksey Kladov
9b2bac621e minor: make code clearer with ControlFlow 2021-09-11 20:49:10 +03:00
Aleksey Kladov
90e27d6289 internal: make xtask lighter
Moving tests to `rust-analyzer` crate allows removing walkdir dependency
from `xtask`. It does seem more reasonable to keep tidy tests outside of
the "build system" and closer to other integration tests.
2021-07-04 12:47:56 +03:00
Aleksey Kladov
58d2ece88a internal: overhaul code generation
* Keep codegen adjacent to the relevant crates.
* Remove codgen deps from xtask, speeding-up from-source installation.

This regresses the release process a bit, as it now needs to run the
tests (and, by extension, compile the code).
2021-07-03 22:11:03 +03:00
Laurențiu Nicola
07ee6ebf56 Fix line numbering in tidy 2021-06-18 14:47:26 +03:00