From 108d9dbb3fa2dcfa3afb2136b0343662bd9c3b62 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 18 Mar 2019 11:32:03 +0100 Subject: [PATCH] Update structor to restore permalink for the latest version --- .gitignore | 18 ++++++++++-------- .travis.yml | 4 ++-- middlewares/accesslog/logger_test.go | 4 +++- mkdocs.yml | 1 + provider/file/file_test.go | 4 ++-- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index a5e8d1692..c114c16f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,17 @@ -/dist -/autogen/genstatic/gen.go .idea/ .intellij/ *.iml -/traefik -/traefik.toml -/static/ -/webui/.tmp/ .vscode/ +.DS_Store +/static/ +/autogen/genstatic/gen.go +/webui/.tmp/ +/examples/acme/acme.json /site/ +/doc/site/ +/traefik.toml +/dist +/traefik *.log *.exe -.DS_Store -/examples/acme/acme.json +cover.out diff --git a/.travis.yml b/.travis.yml index 57fe23a5e..6a5ce30fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,8 +30,8 @@ before_deploy: make -j${N_MAKE_JOBS} crossbinary-parallel; tar cfz dist/traefik-${VERSION}.src.tar.gz --exclude-vcs --exclude dist .; fi; - curl -sfL https://raw.githubusercontent.com/containous/structor/master/godownloader.sh | bash -s -- -b "${GOPATH}/bin" v1.6.0 - structor -o containous -r traefik --dockerfile-url="https://raw.githubusercontent.com/containous/traefik/v1.7/docs.Dockerfile" --menu.js-url="https://raw.githubusercontent.com/containous/structor/master/traefik-menu.js.gotmpl" --rqts-url="https://raw.githubusercontent.com/containous/structor/master/requirements-override.txt" --exp-branch=master --debug; + curl -sfL https://raw.githubusercontent.com/containous/structor/master/godownloader.sh | bash -s -- -b "${GOPATH}/bin" v1.7.0 + structor -o containous -r traefik --dockerfile-url="https://raw.githubusercontent.com/containous/traefik/v1.7/docs.Dockerfile" --menu.js-url="https://raw.githubusercontent.com/containous/structor/master/traefik-menu.js.gotmpl" --rqts-url="https://raw.githubusercontent.com/containous/structor/master/requirements-override.txt" --exp-branch=master --force-edit-url --debug; fi deploy: - provider: releases diff --git a/middlewares/accesslog/logger_test.go b/middlewares/accesslog/logger_test.go index e7c8af991..b8190f09d 100644 --- a/middlewares/accesslog/logger_test.go +++ b/middlewares/accesslog/logger_test.go @@ -44,8 +44,9 @@ func TestLogRotation(t *testing.T) { if err != nil { t.Fatalf("Error setting up temporary directory: %s", err) } + defer os.RemoveAll(tempDir) - fileName := tempDir + "traefik.log" + fileName := filepath.Join(tempDir, "traefik.log") rotatedFileName := fileName + ".rotated" config := &types.AccessLog{FilePath: fileName, Format: CommonFormat} @@ -587,6 +588,7 @@ func captureStdout(t *testing.T) (out *os.File, restoreStdout func()) { restoreStdout = func() { os.Stdout = original + os.RemoveAll(file.Name()) } return file, restoreStdout diff --git a/mkdocs.yml b/mkdocs.yml index b54d2c40b..7897eb407 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,6 +6,7 @@ dev_addr: 0.0.0.0:8000 repo_name: 'GitHub' repo_url: 'https://github.com/containous/traefik' +edit_uri: 'edit/v1.7/docs/' docs_dir: 'docs' diff --git a/provider/file/file_test.go b/provider/file/file_test.go index 38321d764..899500d85 100644 --- a/provider/file/file_test.go +++ b/provider/file/file_test.go @@ -330,13 +330,13 @@ func createProvider(t *testing.T, test ProvideTestCase, watch bool) (*Provider, } return provider, func() { - os.Remove(tempDir) + os.RemoveAll(tempDir) } } func TestTLSContent(t *testing.T) { tempDir := createTempDir(t, "testdir") - defer os.Remove(tempDir) + defer os.RemoveAll(tempDir) fileTLS := createRandomFile(t, tempDir, "CONTENT") fileConfig := createRandomFile(t, tempDir, `