Skip to content

Commit

Permalink
Merge branch 'next' into autocomplete-popover
Browse files Browse the repository at this point in the history
  • Loading branch information
kilobyte2007 committed Apr 12, 2023
2 parents 45414f8 + 3348200 commit 1724ab7
Show file tree
Hide file tree
Showing 53 changed files with 25,021 additions and 17,592 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [14.x, 16.x, 18.x]
node-version: [lts/*] # latest LTS version of Node
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/publish-docs-next.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Exit on first error, treat unset variables as errors
set -eu

BRANCH_NEXT="next"
BRANCH_GH_PAGES="gh-pages"

echo "BRANCH_NEXT: $BRANCH_NEXT"
echo "BRANCH_GH_PAGES: $BRANCH_GH_PAGES"

# Exit if the current branch is not the next branch
if [[ $(git rev-parse --abbrev-ref HEAD) != "$BRANCH_NEXT" ]]; then
echo "This script can only be run on the $BRANCH_NEXT branch."
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)"
exit 1
fi

# Keep track of the current commit sha
LAST_COMMIT_ON_NEXT=$(git rev-parse --short HEAD)
echo "LAST_COMMIT_ON_NEXT: $LAST_COMMIT_ON_NEXT"

# Change the version to "next" before building the docs
echo "export default \"next\";" > ./build/version.mjs

echo ""
echo "Building docs..."
yarn build:docs

# Undo the change to the version, to switch branches
git checkout -- ./build/version.mjs

echo ""
echo "Switching to the $BRANCH_GH_PAGES branch..."
git checkout $BRANCH_GH_PAGES

echo ""
echo "Replacing the existing \`next\` docs with a copy of the new docs..."
rm -rf next && mv docs/ next/

# The built files have links to the `master` branch on GitHub.
# Find and replace those links to point to the next branch. Replace:
# - `/tree/master` with `/tree/$BRANCH_NEXT`
# - `/blob/master` with `/blob/$BRANCH_NEXT`
echo ""
echo "Replacing links to \`master\` with links to \`$BRANCH_NEXT\`..."
BRANCH_NEXT_SLASH_ESCAPED=$(echo "$BRANCH_NEXT" | sed 's/\//\\\//g')
find next/ -type f -exec sed -i -e "s/\/tree\/master/\/tree\/$BRANCH_NEXT_SLASH_ESCAPED/g" {} \;
find next/ -type f -exec sed -i -e "s/\/blob\/master/\/blob\/$BRANCH_NEXT_SLASH_ESCAPED/g" {} \;

# If there are changes in the built docs, commit and push them
if ! git diff --quiet -- next/; then
echo ""
echo "Committing the changes..."
git add next/
git -c user.name="Josephus Paye II" -c user.email="j.paye96@gmail.com" \
commit -m "Add \`next\` docs for commit $LAST_COMMIT_ON_NEXT"

echo ""
echo "Pushing the changes to the $BRANCH_GH_PAGES branch..."
git push origin $BRANCH_GH_PAGES
else
echo ""
echo "No changes to built docs, skipping publish"
exit 0
fi
56 changes: 56 additions & 0 deletions .github/workflows/publish-docs-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish docs for `next` branch

on:
push:
branches: [next]

# Used to ensure only one instance of the workflow is running at a time, cancels existing runs when there's a new one.
# See https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency.
concurrency:
# `github.workflow` is workflow name, `github.ref` is current branch/tag identifier
group: ${{ format('{0}:{1}', github.workflow, github.ref) }}
cancel-in-progress: true

jobs:
check_for_changes:
name: Check for changes
runs-on: ubuntu-22.04
outputs:
has_workflow_changes: ${{ steps.filter.outputs.workflow_changes }}
has_docs_changes: ${{ steps.filter.outputs.docs_changes }}
has_src_changes: ${{ steps.filter.outputs.src_changes }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Check for Changes
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
workflow_changes:
- '.github/workflows/publish-docs-next*'
docs_changes:
- 'docs-src/**'
src_changes:
- 'src/**'
publish_docs:
name: "Build and publish docs to GitHub Pages"
runs-on: "ubuntu-latest"
needs: ["check_for_changes"]
if: |
needs.check_for_changes.outputs.has_workflow_changes == 'true' ||
needs.check_for_changes.outputs.has_docs_changes == 'true' ||
needs.check_for_changes.outputs.has_src_changes == 'true'
steps:
- uses: actions/checkout@v3
with:
ref: next
fetch-depth: 0 # fetch all history so we can switch branches to `gh-pages`
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: bash .github/workflows/publish-docs-next.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ _reminder
Thumbs.db
npm-debug.log
.DS_Store
docs
140 changes: 140 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,143 @@
# v2.0.0 (to be released)

This is a breaking release that upgrades Keen UI to work with Vue 3. If you are using Vue 2, you may continue to use the latest version of Keen UI 1.x.

## UiAlert

- TODO: document any API changes

## UiAutocomplete

- TODO: document any API changes

## UiButton

- TODO: document any API changes

## UiCalendar

- TODO: document any API changes

## UiCheckbox

- TODO: document any API changes

## UiCheckboxGroup

- TODO: document any API changes

## UiCloseButton

- TODO: document any API changes

## UiCollapsible

- TODO: document any API changes

## UiConfirm

- TODO: document any API changes

## UiDatepicker

- TODO: document any API changes

## UiDatepickerCalendar

- TODO: document any API changes

## UiFab

- TODO: document any API changes

## UiFileupload

- TODO: document any API changes

## UiIcon

- TODO: document any API changes

## UiIconButton

- TODO: document any API changes

## UiMenu

- TODO: document any API changes

## UiModal

- TODO: document any API changes

## UiPopover

- TODO: document any API changes

## UiPreloader

- TODO: document any API changes

## UiProgressCircular

- TODO: document any API changes

## UiProgressLinear

- TODO: document any API changes

## UiRadio

- TODO: document any API changes

## UiRadioGroup

- TODO: document any API changes

## UiRippleInk

- TODO: document any API changes

## UiSelect

- TODO: document any API changes

## UiSlider

- TODO: document any API changes

## UiSnackbar

- TODO: document any API changes

## UiSnackbarContainer

- TODO: document any API changes

## UiSwitch

- TODO: document any API changes

## UiTab

- TODO: document any API changes

## UiTabs

- TODO: document any API changes

## UiTextbox

- TODO: document any API changes

## UiToolbar

- TODO: document any API changes

## UiTooltip

- TODO: document any API changes

# v1.4.0

**Potentially Breaking Change**: Upgraded from [`node-sass`](https://npmjs.com/package/node-sass) to [`sass`](https://npmjs.com/package/sass), and fixed warnings about `/` division (see [#529](https://github.com/JosephusPaye/Keen-UI/pull/529)). `node-sass` is now deprecated, and `sass` [no longer uses the `/` operator for division](https://sass-lang.com/documentation/breaking-changes/slash-div).
Expand Down

0 comments on commit 1724ab7

Please sign in to comment.