From c9cf37ca53a4b6f212e2cf34fb2e8702bd6a94bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 15 May 2019 22:23:58 +0200 Subject: Make Travis build work --- .travis.yml | 32 ++++++++++++++++++++++++++++++-- github_deploy_key1.enc | Bin 3408 -> 0 bytes github_deploy_key_linux.enc | Bin 0 -> 3408 bytes github_deploy_key_osx.enc | Bin 0 -> 3408 bytes github_deploy_key_windows.enc | Bin 0 -> 3408 bytes testmodBuilder/build/main.go | 2 +- 6 files changed, 31 insertions(+), 3 deletions(-) delete mode 100644 github_deploy_key1.enc create mode 100644 github_deploy_key_linux.enc create mode 100644 github_deploy_key_osx.enc create mode 100644 github_deploy_key_windows.enc diff --git a/.travis.yml b/.travis.yml index 2c959f5..416c33b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,21 @@ env: global: - GO111MODULE=on - GOPROXY="https://proxy.golang.org" + +matrix: + include: + - os: linux + env: + - K=$encrypted_8df8c5cb3fb6_key + - IV=$encrypted_8df8c5cb3fb6_iv + - os: osx + env: + - K=$encrypted_6d9c893e872c_key + - IV=$encrypted_6d9c893e872c_iv + - os: windows + env: + - K=$encrypted_bd59bad23324_key + - IV=$encrypted_bd59bad23324_iv go: - 1.12.x @@ -14,8 +29,21 @@ git: notifications: email: false -before_install: - - openssl aes-256-cbc -K $encrypted_52681b3983bc_key -iv $encrypted_52681b3983bc_iv -in github_deploy_key1.enc -out github_deploy_key -d +before_script: + - git config --global user.email "hugo-ci@gohugo.io" + - git config --global user.name "Hugo CI" + - >- + openssl aes-256-cbc + -K $K + -iv $IV + -in github_deploy_key_$TRAVIS_OS_NAME.enc + -out github_deploy_key + -d + - chmod 600 github_deploy_key + - eval $(ssh-agent -s) + - ssh-add github_deploy_key + - mkdir -p ~/.ssh + - echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config script: - cd testmodBuilder/build - go run main.go diff --git a/github_deploy_key1.enc b/github_deploy_key1.enc deleted file mode 100644 index 49ae8c8..0000000 Binary files a/github_deploy_key1.enc and /dev/null differ diff --git a/github_deploy_key_linux.enc b/github_deploy_key_linux.enc new file mode 100644 index 0000000..5a536e5 Binary files /dev/null and b/github_deploy_key_linux.enc differ diff --git a/github_deploy_key_osx.enc b/github_deploy_key_osx.enc new file mode 100644 index 0000000..5fb558e Binary files /dev/null and b/github_deploy_key_osx.enc differ diff --git a/github_deploy_key_windows.enc b/github_deploy_key_windows.enc new file mode 100644 index 0000000..d8c5231 Binary files /dev/null and b/github_deploy_key_windows.enc differ diff --git a/testmodBuilder/build/main.go b/testmodBuilder/build/main.go index 2c0960a..3feede9 100644 --- a/testmodBuilder/build/main.go +++ b/testmodBuilder/build/main.go @@ -113,7 +113,7 @@ func (b *mb) clean() error { // The clean script will be run with the target repo's PWD, so // we need to make the path absolute. dir, _ := os.Getwd() - if err := b.run(filepath.Join(dir, "clean.sh")); err != nil { + if err := b.run("bash", filepath.Join(dir, "clean.sh")); err != nil { return err } -- cgit v1.2.3