cc-archive / vocabulary-legacy

A cohesive design system & Vue component library to unify the web-facing Creative Commons
https://cc-vocabulary.netlify.app
MIT License
88 stars 129 forks source link

Restore src files from last deletion point, and cherry-pick commits in from vocabulary-styles repo #1084

Closed possumbilities closed 2 years ago

possumbilities commented 2 years ago

Fixes

This is related to work in: creativecommons/vocabulary#2

Description

  1. Deprecate the existing files in creativecommons/vocabulary/src/, but keep for later reference. Move to creativecommons/vocabulary/src/_deprecated/
  2. Retrieve last state of creativecommons/vocabulary/packages/vocabulary/src/ to use going forward from eb60730128, and move to creativecommons/vocabulary/src/ directory
  3. Cherry-pick more current work on creativecommons/vocabulary-styles: 7ad97a943d src/styles/header.scss into creativecommons/vocabulary/src/styles/header.scss.
  4. creativecommons/vocabulary/src/ now contains the last workable state of files from eb60730128, as well as more current changes made in creativecommons/vocabulary-styles: 7ad97a943d src/styles/header.scss
  5. Move creativecommons/vocabulary/src/styles/ to more descriptive and conventional creativecommons/vocabulary/src/scss/ directory

Technical details

This PR (with help from Timid Robot) does the following:

  1. Clone creativecommons/vocabulary (this repository)
  2. Perform any needed configuration (ex. GnuPG signing)
  3. Move files in src to a deprecated folder
    git mv src/* src/_deprecated
    git commit -m 'deprecate files, but keep for future reference'
  4. Checkout branch at last commit for packages/vocabulary/src/ prior to deletion
    git checkout eb60730128 -b temp-eb60730128
  5. Prepare cherry-pick directory:
    mkdir -p src
  6. Move file into cherry-pick directory:
    git mv packages/vocabulary/src/* src/
    git commit -m 'move files into cherry-pick directory'
  7. Save commit reference
    SAVED=$(git rev-parse HEAD)
  8. Create working/destination branch
    git checkout -b restore-src-files main
  9. Merge restored file in cherry-pick directory
    git merge ${SAVED}

    (this will give a CONFLICT warning)

    git add src
    git commit -m 'restore files'
  10. Add creativecommons/vocabulary-styles as a remote and update branches
    git remote add vocabulary-styles https://github.com/creativecommons/vocabulary-styles.git
    git remote update
  11. Cherry-pick all commits creativecommons/vocabulary-styles: 7ad97a943d src/styles/header.scss since that repository was created:
    git cherry-pick -Xtheirs ca73e9b411f8d187cd10468b340615606b0dd8a6
    git cherry-pick -Xtheirs 6d2b73a320972822a126790a1f18502c9e751bee
    git cherry-pick -Xtheirs fdfc5486b972621fb9c060af78992c31eb7ad991
    git cherry-pick -Xtheirs f385e0e57de81074405fa87ec0279f8feaf86a67
  12. Create final destination for file
    mkdir -p src/scss
  13. Move file into final destination
    git mv src/styles/* src/scss/
    git commit -m 'move files to scss directory'

    Result

Related Links

Checklist

- [x] My pull request has a descriptive title (not a vague title like `Update index.md`). - [x] My pull request targets the *default* branch of the repository (`main` or `master`). - [x] My commit messages follow [best practices][best_practices]. - [x] My code follows the established code style of the repository. - [ ] I added or updated tests for the changes I made (if applicable). - [ ] I added or updated documentation (if applicable). - [ ] I tried running the project locally and verified that there are no visible errors. [best_practices]:https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53 ## Developer Certificate of Origin

For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."

Developer Certificate of Origin ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ```