Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from using git submodules to ignored folders for www dependencies #305

Merged
merged 1 commit into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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