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

Version 1.1.0 #1

Merged
merged 13 commits into from
Nov 17, 2023
Merged

Version 1.1.0 #1

merged 13 commits into from
Nov 17, 2023

Conversation

neonspectra
Copy link
Member

@neonspectra neonspectra commented Nov 8, 2023

Arise v1.1.0


Changelog

  • Bumped actions/checkout@v2 to actions/checkout@v4. No impact from this change.
  • Removed sed from the metadata tag evaluation in build_header. Replaced with Bash native pattern matching so that this evaluation is safer.
  • Added checks to automatically rewrite any XML reserved characters (&<>'") as their escape codes when present in page metadata (title, author, etc).
    • Rewrote the way a majority of the page metadata values are parsed in get_page_metadata to make the parsing more robust. This was necessary because previously unescaped double quotes (") would break the parser. The workaround was to use escape codes, but if we're automatically parsing escape codes then we need a way to put these characters in unescaped now.
    • Added a CI test suite to build the default site and test to make sure that the XML reserved characters are getting properly escaped. This is helpful because it allows me to more continuously ensure that commits I make in dev don't break the site.
  • Added a Smart Deploy step in the deployment workflow to check whether the triggering branch is main or not so that CICD can intelligently deploy the site to either production or staging depending on what branch triggered the deployment.

@neonspectra
Copy link
Member Author

Well, well, well, if it isn't the consequences of my own actions. Rebased PR on base branch after doing the fuckery to fix git blame for v1.0.0 in main. This mess is a product of my own incompetence.

@neonspectra
Copy link
Member Author

neonspectra commented Nov 9, 2023

Re-signed unverified commits since GitHub's auto rebase doesn't sign them. What a mess.

neonspectra and others added 3 commits November 9, 2023 14:02
Forgot to document this in the fix that removed sed from header generation
#3)

A user might want to use XML reserved characters in their page metadata, not realising that this would break the sitemap or RSS feed. This PR implements a cleaner function to ensure such characters are automatically replaced with escape codes at runtime.

This PR also adds a new unit test to make sure that the sanitisation actually works so that we don't break it down the line.
@neonspectra neonspectra added the arise version Tag for PRs that create a new version of the app label Nov 10, 2023
…aging (#5)

The way the deployment workflow worked originally is that it was hardcoded to deploy to a branch html, so if we wanted to test changes in staging we had to manually edit the workflow.

This PR adds a check to determine whether the branch we're working on is main or not. If it's main, deployments go to production. If it's not, deployments go to staging.
@neonspectra
Copy link
Member Author

Tested and verified it works. Also dogfooded this on my personal website to make sure nothing breaks. This new version is good to go!

@neonspectra neonspectra merged commit ee6414e into main Nov 17, 2023
1 check passed
@neonspectra neonspectra deleted the 1.1.0 branch November 17, 2023 00:10
github-actions bot pushed a commit that referenced this pull request Nov 17, 2023
# Arise v1.1.0

---

## Changelog

- Bumped `actions/checkout@v2` to `actions/checkout@v4`. No impact from this change.
- Removed `sed` from the metadata tag evaluation in `build_header`. Replaced with Bash native pattern matching so that this evaluation is safer.
- Added checks to automatically rewrite any XML reserved characters (&<>'") as their escape codes when present in page metadata (title, author, etc).
    - Rewrote the way a majority of the page metadata values are parsed in `get_page_metadata` to make the parsing more robust. This was necessary because previously unescaped double quotes (`"`) would break the parser. The workaround was to use escape codes, but if we're automatically parsing escape codes then we need a way to put these characters in unescaped now.
    - Added a CI test suite to build the default site and test to make sure that the XML reserved characters are getting properly escaped. This is helpful because it allows me to more continuously ensure that commits I make in dev don't break the site.
- Added a Smart Deploy step in the deployment workflow to check whether the triggering branch is `main` or not so that CICD can intelligently deploy the site to either production or staging depending on what branch triggered the deployment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arise version Tag for PRs that create a new version of the app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant