week of 04 nov

04 Nov 2019

04 nov

roots on MAMP

  1. launch mamp
  2. go to webstart page
  3. go to tools > phpmyadmin
  4. in the main window, click the databases tab
  5. under “Create database” add a name for a new database (roots?)
  6. download latest WP from wordpress.org/download and unzip
  7. move that wordpress folder to where you want your wordpress install to live (on macs, use /Sites) and rename to new path name
  8. if you haven’t alreay done so, change mamp directory to where your folder is (MAMP > Preferences > Web Server > Document Root)
  9. might also want to change your ports to 80/3306 so you don’t have to do localhost:8888
  10. head to localhost, click the directory for your new WP isntall
  11. run through WP install process: database name is whatever you named your database in step 5, username/password are both root, leave the last two alone; click run installation
  12. on welcome page, create your login info… I like to keep this to the same as my other wordpress logins so I don’t confused later
  13. log in to new WP, should see the dashboard
  14. clone roots-ualib repo into wp-content/themes directory
  15. INSTALL ALL THE THINGS from the Quick Start part of the theme wiki
    • npm i -g grunt-cli bower
    • sudo npm i
    • bower install
    • grunt
    • once it finishes building, Ctrl+C to stop watching
    • open roots-ualib/wp-config.php and add define( 'WP_ENV', 'development' ); to the top under the initial comments
  16. In WP dashboard, head to Appearance > Themes and activate wp theme
  17. dunzo!

08 nov

Hokay, so. I’ve run into something that I should definitely document. I’m doing something I’ve never done before- make changes to pull request locally! The problem is I went through the whole process of adding a remote, fetching down the pull request, etc. just to remember that I actually need to make the changes to a different repo and build the changes into the roots repo. heavy sigh

making changes to a PR on my local machine

Here’s what I did, although I’m still not sure it was the right thing to do.

From my local roots build:

  1. I needed to add ualib-deploy as a remote so I could fetch the PR: git remote add deploy https://github.com/ualib-deploy/roots-ualib.git
  2. git remote -v to make sure it worked :joy:
  3. git fetch deploy pull/[PULLREQUESTNUMBER]/head:[NEWBRANCHNAME] (I went with pull/245/head:pr245)
  4. git checkout pr245
  5. Refreshed my browser to see if the PR changes were in there, and woohoo, it worked!

This is when I went into vim to make some edits only to remember that’s not how any of this works. :woman_facepalming:

training james

I used this opportunity to show James the full workflow of one of our apps. Since the change was going to be to “Hours today” widget on the homepage, you have to make that change in the hours app… which is in its own repo.

I need to write actual documentation for this process because I had a hard time remembering all the steps. I made a brief list of steps in asana to jog my memory next time I decide to have a “write ALL THE DOCS” kind of day.