openstax / webview

Connexions web site
http://cnx.org
GNU Affero General Public License v3.0
12 stars 8 forks source link

filter cnx-recipes -> ce-styles #2321

Closed kswanson33 closed 2 years ago

kswanson33 commented 2 years ago

git-filter-repo filters not just the files, but also the commit history for those files, and creates a new repo with the files & history. We will use this to create the ce-styles repo to bring over relevant files & their history.

Phil suggested this in a thread a while back: https://openstax.slack.com/archives/C0LA54Q5C/p1642612936119700?thread_ts=1642610000.107200&cid=C0LA54Q5C

The list of files to keep is most important here; we'll want to take a close look at this list and make sure to get everything before going forward with it.

Phil's script:

#!/bin/bash
​
set -x -e
​
[[ -d ./cnx-recipes-remove-everything-except-styles ]] && rm -rf ./cnx-recipes-remove-everything-except-styles
​
git clone https://github.com/openstax/cnx-recipes ./cnx-recipes-remove-everything-except-styles
​
pushd ./cnx-recipes-remove-everything-except-styles
​
git-filter-repo \
    --path .devcontainer/ \
    --path .github/ \
    --path README.md \
    --path package.json \
    --path yarn.lock \
    --path styles/ \
    --path script/bootstrap \
    --path script/_bootstrap.sh \
    --path script/build-styles \
    --path js/node-sass-importer/import-once.js \
    ;
​
    # --path .sass-lint.yml \
    # --path .stylelintrc \
    # --path script/setup \
    # --path script/_setup.sh \
​
popd
​
[[ -d ./_temp ]] && rm -rf ./_temp
​
git clone ./cnx-recipes-remove-everything-except-styles ./_temp
​
pushd ./_temp
​
yarn
​
./script/build-styles
​
echo "Exit status: $?"
kswanson33 commented 2 years ago

should be made in cnx-recipes not webview