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

Only commit changed packages to master #341

Merged
merged 3 commits into from
Jan 10, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
25 changes: 14 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ STABLE_TARGETS = $(shell hack/chart_destination.sh $(STABLE_CHARTS))
STAGING_CHARTS = $(wildcard staging/*/Chart.yaml)
STAGING_TARGETS = $(shell hack/chart_destination.sh $(STAGING_CHARTS))

GIT_REMOTE_URL ?= https://mesosphere:$(GITHUB_USER_TOKEN)@github.com/mesosphere/charts.git
GIT_REMOTE_URL ?= $(shell git remote get-url origin)

# Extract the github user from the origin remote url.
# This let's the 'publish' task work with forks.
Expand All @@ -14,8 +14,9 @@ GIT_REMOTE_URL ?= https://mesosphere:$(GITHUB_USER_TOKEN)@github.com/mesosphere/
# - [email protected]:mesosphere/charts.git
GITHUB_USER := $(shell git remote get-url origin | sed -E 's|.*github.com[/:]([^/]+)/charts.*|\1|')

GIT_REF = $(shell git show-ref -s HEAD)
LAST_COMMIT_MESSAGE := $(shell git reflog -1 | sed 's/^.*: //')
GIT_REF = $(shell git rev-parse HEAD)
LAST_COMMIT_MESSAGE := $(shell git log -1 --pretty=format:'%B')
NON_DOCS_FILES := $(filter-out docs,$(wildcard *))

TMPDIR := $(shell mktemp -d)
HELM := $(shell bash -c "command -v helm")
Expand Down Expand Up @@ -52,14 +53,16 @@ stablerepo: $(STABLE_TARGETS) | docs/stable/index.yaml
.PHONY: publish
publish:
-git remote add publish $(GIT_REMOTE_URL) >/dev/null 2>&1
-@git branch -D master
@git checkout -b master
@curl -Ls https://github.com/mesosphere/charts/archive/master.tar.gz | tar -xz --strip-components=1 charts-master/docs
@make all
@git add .
@git commit -m "$(LAST_COMMIT_MESSAGE)"
@git push -f publish master
@git checkout -
-git branch -D master
git checkout -b master
git fetch publish master
git reset --hard publish/master
git checkout $(GIT_REF) -- $(NON_DOCS_FILES)
make all
git add -A .
git commit -m "$(LAST_COMMIT_MESSAGE)"
git push publish master
git checkout -

$(HELM):
ifeq ($(HELM),$(TMPDIR)/helm)
Expand Down
Empty file removed docs/.gitignore
Empty file.
Binary file removed docs/stable/awsebscsiprovisioner-0.1.0.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.2.0.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.2.2.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.2.3.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.2.4.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.2.5.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.2.6.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.2.7.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.2.8.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.2.9.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.3.0.tgz
Binary file not shown.
Binary file removed docs/stable/awsebscsiprovisioner-0.3.1.tgz
Binary file not shown.
Binary file removed docs/stable/awsebsprovisioner-0.1.0.tgz
Binary file not shown.
Binary file removed docs/stable/awsebsprovisioner-0.1.1.tgz
Binary file not shown.
Binary file removed docs/stable/awsebsprovisioner-0.1.2.tgz
Binary file not shown.
Binary file removed docs/stable/awsebsprovisioner-0.1.3.tgz
Binary file not shown.
Binary file removed docs/stable/dex-1.5.2.tgz
Binary file not shown.
Binary file removed docs/stable/dex-1.5.3.tgz
Binary file not shown.
Binary file removed docs/stable/dex-1.5.4.tgz
Binary file not shown.
Binary file removed docs/stable/dex-1.6.0.tgz
Binary file not shown.
Binary file removed docs/stable/dex-1.6.1.tgz
Binary file not shown.
Binary file removed docs/stable/dex-1.6.2.tgz
Binary file not shown.
Binary file removed docs/stable/dex-1.6.3.tgz
Binary file not shown.
Binary file removed docs/stable/dex-1.6.4.tgz
Binary file not shown.
Binary file removed docs/stable/dex-1.6.5.tgz
Binary file not shown.
Binary file removed docs/stable/dex-controller-0.1.1.tgz
Binary file not shown.
Loading