Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow Bikeshed filename convention: Use index.bs #469

Merged

Conversation

sideshowbarker
Copy link
Contributor

@sideshowbarker sideshowbarker commented Feb 20, 2021

This change renames the spec source to index.bs (from index.src.html), to conform it to the normal/expected Bikeshed filename convention.

That makes the source immediately recognizable as a Bikeshed file (rather than, say, a Respec source file) to anyone looking at the repo, and to automated tooling such as https://github.com/w3c/spec-prod.

Otherwise, without renaming the source to index.bs, it’s necessary to feed additional non-default options to such tooling to tell it that we call our Bikeshed source “index.src.html”.


Once this change is merged, we can do the following:

Switch our CI over to using https://github.com/w3c/spec-prod

https://github.com/w3c/spec-prod is a very new, specialized tool that easily automates all steps of building, validating, and publishing specs.

I’ve already set it up for the Credential Management spec. All that was needed was to add one GitHub Actions file:

https://github.com/w3c/webappsec-credential-management/blob/00cabe81f57ac8863afec40825f16e28fa144127/.github/workflows/build-validate-publish.yml#L1-L18

name: CI
on:
  pull_request: {}
  push:
    branches: [main]

jobs:
  main:
    name: Build, Validate, and Publish
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - uses: w3c/spec-prod@v2
        with:
          GH_PAGES_BRANCH: gh-pages
          BUILD_FAIL_ON: nothing
          VALIDATE_LINKS: false
          VALIDATE_MARKUP: true

And when we move all the WebAppSec specs to also being autopublished to https://www.w3.org/TR/ spec, all that’ll be needed is to add one more variable to that config file.

But if we don’t rename the WebAppSec source files to follow the index.bs naming convention, then we’d need to add further options to the config files for every repo, to tell it we’re calling the source index.src.html. That’s not a big hardship, but it would be simpler to just follow the normal Bikeshed filename convention, and get the automatic benefits of that.

Drop Travis (.travis.yml)

For the CSP repo, we currently still have Travis set up to run Bikeshed on PR branches. Switching to https://github.com/w3c/spec-prod would let us drop Travis, because https://github.com/w3c/spec-prod provides the same capability, with HTML validation of the output thrown in for free.

@sideshowbarker sideshowbarker force-pushed the sideshowbarker/bikeshed-file-naming-convention branch 3 times, most recently from d6db478 to 78cb3bd Compare February 20, 2021 07:38
This change renames the spec source to index.bs (from index.src.html),
to conform it to the normal/expected Bikeshed filename convention.

That makes the source immediately recognizable as a Bikeshed file
(rather than, say, a Respec source file) to anyone looking at the repo,
and to automated tooling such as https://github.com/w3c/spec-prod.

Otherwise, without renaming the source to index.bs, it’s necessary to
feed additional non-default options to such tooling to tell it that we
call our Bikeshed source “index.src.html”.
@sideshowbarker sideshowbarker force-pushed the sideshowbarker/bikeshed-file-naming-convention branch from 78cb3bd to 78d1928 Compare March 2, 2021 10:52
@sideshowbarker sideshowbarker merged commit f9c4c7a into main Mar 2, 2021
@sideshowbarker sideshowbarker deleted the sideshowbarker/bikeshed-file-naming-convention branch March 2, 2021 10:56
sideshowbarker added a commit that referenced this pull request Mar 2, 2021
As summarized in #469, this
patch switches the repo over to using https://github.com/w3c/spec-prod
for CI, and removes the .travis.yml file.
sideshowbarker added a commit that referenced this pull request Mar 2, 2021
As summarized in #469, this
patch switches the repo over to using https://github.com/w3c/spec-prod
for CI, and removes the .travis.yml file.
sideshowbarker added a commit that referenced this pull request Mar 2, 2021
As summarized in #469, this
patch switches the repo over to using https://github.com/w3c/spec-prod
for CI, and removes the .travis.yml file.
github-actions bot added a commit that referenced this pull request Mar 2, 2021
… in #469, thispatch switches the repo over to using https://github.com/w3c/spec-prodfor CI, and removes the .travis.yml file.

SHA: 195397e
Reason: push, by @sideshowbarker

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ryandel8834 added a commit to ryandel8834/WebAppSec-CSP that referenced this pull request Aug 13, 2022
As summarized in w3c/webappsec-csp#469, this
patch switches the repo over to using https://github.com/w3c/spec-prod
for CI, and removes the .travis.yml file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant