Skip to content

Commit

Permalink
Merge pull request #305 from chef/schisamo/no-moar-submodules
Browse files Browse the repository at this point in the history
Switch from using git submodules to ignored folders for www dependencies
  • Loading branch information
schisamo authored Oct 22, 2018
2 parents 8f493c8 + c7ab8d3 commit 8766bc0
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

13 changes: 13 additions & 0 deletions www/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Hugo
public

# markdownlint
.markdownlint.json

# chef-www-acceptance.cd.chef.co content
chef-sh

# upstream repos
chef-www
site/themes/chef
site/layouts
25 changes: 23 additions & 2 deletions www/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
sync:
git submodule update --init --remote --rebase
# we use pushd/popd here, and /bin/sh of our chefes/buildkite image is not bash
# so we have to override the default shell here
SHELL=bash

chef-www:
git clone https://github.com/chef/chef-www.git chef-www

site/themes/chef:
git clone https://github.com/chef/chef-hugo-theme.git site/themes/chef

clean:
rm -rf chef-sh
rm -rf chef-www
rm -rf site/layouts
rm -rf site/themes/chef

sync: chef-www site/themes/chef
pushd chef-www && git fetch && git reset --hard origin/master && popd
pushd site/themes/chef && git fetch && git reset --hard origin/master && popd
cp -R chef-www/site/layouts site/
aws --profile chef-cd s3 sync s3://chef-www-acceptance.cd.chef.co chef-sh --delete

serve: sync
cd site && hugo server --buildDrafts --noHTTPCache

lint: chef-www site/themes/chef
pushd site && hugo -D && popd

0 comments on commit 8766bc0

Please sign in to comment.