From 8c6574f00a94e5c25751ca8290efb0a1abb8d45f Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Wed, 30 Oct 2019 19:50:22 -0400 Subject: [PATCH 01/18] travis test --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 877dbee9ade2..0c7c9fd0e1c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,4 @@ script: - mypy --ignore-missing-imports . - pytest . --doctest-modules after_success: - - scripts/build_directory_md.py > DIRECTORY.md - - cat DIRECTORY.md + - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md From cc5503500365d7728b522cb78c90ee849cf0d3b0 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Wed, 30 Oct 2019 20:44:50 -0400 Subject: [PATCH 02/18] travis pull ID test --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 877dbee9ade2..7aaf813c92a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,6 @@ script: - mypy --ignore-missing-imports . - pytest . --doctest-modules after_success: - - scripts/build_directory_md.py > DIRECTORY.md + - scripts/build_directory_md.py 2&>1 tee DIRECTORY.md - cat DIRECTORY.md + - echo $TRAVIS_PULL_REQUEST \ No newline at end of file From 5f12b5ffe231ac6c7d2edafcc0d1c416e1e736eb Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Wed, 30 Oct 2019 20:53:18 -0400 Subject: [PATCH 03/18] get pr branch test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7aaf813c92a5..34f0cbfd64ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ script: after_success: - scripts/build_directory_md.py 2&>1 tee DIRECTORY.md - cat DIRECTORY.md - - echo $TRAVIS_PULL_REQUEST \ No newline at end of file + - echo $TRAVIS_PULL_REQUEST_BRANCH \ No newline at end of file From abbf642730f10df650cc805bcc72412071f8df93 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Wed, 30 Oct 2019 21:07:31 -0400 Subject: [PATCH 04/18] retry pr build --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index accf69d1b1a3..d82b8caf966b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,6 @@ script: - mypy --ignore-missing-imports . - pytest . --doctest-modules after_success: - - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md \ No newline at end of file + - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md + - echo $TRAVIS_PULL_REQUEST + - echo $TRAVIS_PULL_REQUEST_BRANCH \ No newline at end of file From 22a12c938d8f54006035a43b191b91ff4130a2e6 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Wed, 30 Oct 2019 21:39:15 -0400 Subject: [PATCH 05/18] test pushing back - probable git error for origin 'not found' --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d82b8caf966b..5997c61d69c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,5 +12,7 @@ script: - pytest . --doctest-modules after_success: - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md - - echo $TRAVIS_PULL_REQUEST - - echo $TRAVIS_PULL_REQUEST_BRANCH \ No newline at end of file + - echo $TRAVIS_PULL_REQUEST && echo $TRAVIS_PULL_REQUEST_BRANCH + - git fetch origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_PULL_REQUEST_BRANCH + - git checkout $TRAVIS_PULL_REQUEST_BRANCH + - git push origin $TRAVIS_PULL_REQUEST_BRANCH \ No newline at end of file From c46312974c5cb9428d633129889facd849e8dc2a Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Wed, 30 Oct 2019 23:10:42 -0400 Subject: [PATCH 06/18] github auth? --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5997c61d69c6..d68d089c91e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ script: after_success: - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md - echo $TRAVIS_PULL_REQUEST && echo $TRAVIS_PULL_REQUEST_BRANCH + - composer config github-oauth.github.com ${gh_token} - git fetch origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_PULL_REQUEST_BRANCH - git checkout $TRAVIS_PULL_REQUEST_BRANCH - git push origin $TRAVIS_PULL_REQUEST_BRANCH \ No newline at end of file From 6391d72cb4f0dfd333e265f0f1d3869186ccc9bf Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 00:16:22 -0400 Subject: [PATCH 07/18] add .sh --- .travis.yml | 5 +---- scripts/push_directory_md.sh | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 scripts/push_directory_md.sh diff --git a/.travis.yml b/.travis.yml index d68d089c91e7..cb7d1872cc23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,4 @@ script: after_success: - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md - echo $TRAVIS_PULL_REQUEST && echo $TRAVIS_PULL_REQUEST_BRANCH - - composer config github-oauth.github.com ${gh_token} - - git fetch origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_PULL_REQUEST_BRANCH - - git checkout $TRAVIS_PULL_REQUEST_BRANCH - - git push origin $TRAVIS_PULL_REQUEST_BRANCH \ No newline at end of file + - scripts/push_directory_md.sh \ No newline at end of file diff --git a/scripts/push_directory_md.sh b/scripts/push_directory_md.sh new file mode 100644 index 000000000000..f0e15631dff0 --- /dev/null +++ b/scripts/push_directory_md.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Source: https://gist.github.com/willprice/e07efd73fb7f13f917ea + +setup_git() { + git config --global user.email "${gh_email}" + git config --global user.name "${gh_user}" +} + +commit_website_files() { + git checkout $TRAVIS_PULL_REQUEST_BRANCH + git add DIRECTORY.md + git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" +} + +upload_files() { + git remote add origin https://${gh_token}@github.com/$TRAVIS_REPO_SLUG > /dev/null 2>&1 + git push --quiet --set-upstream origin $TRAVIS_PULL_REQUEST_BRANCH +} + +setup_git +commit_website_files +upload_files \ No newline at end of file From b5f73055e20520dd822b0ba7482254494b3cf393 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 13:02:00 -0400 Subject: [PATCH 08/18] chmod --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index cb7d1872cc23..8915df39c152 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ cache: pip before_install: pip install --upgrade pip setuptools install: pip install -r requirements.txt before_script: + - chmod 644 scripts/push_directory_md.sh - black --check . || true - flake8 . --count --select=E9,F4,F63,F7,F82 --show-source --statistics script: From ac50a2c8b3a6c5dbb8d6810d4c486fac03b2e738 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 14:25:15 -0400 Subject: [PATCH 09/18] add index update for permission fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8915df39c152..2113c352bd2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ cache: pip before_install: pip install --upgrade pip setuptools install: pip install -r requirements.txt before_script: - - chmod 644 scripts/push_directory_md.sh - black --check . || true - flake8 . --count --select=E9,F4,F63,F7,F82 --show-source --statistics script: @@ -14,4 +13,5 @@ script: after_success: - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md - echo $TRAVIS_PULL_REQUEST && echo $TRAVIS_PULL_REQUEST_BRANCH + - git update-index --add --chmod=+x scripts/build_directory_md.py - scripts/push_directory_md.sh \ No newline at end of file From d895a005d240991e9d24c8afa598b2bb6c951d21 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 14:32:32 -0400 Subject: [PATCH 10/18] run sh for script --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2113c352bd2f..cd89738a0d87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ language: python python: 3.7 cache: pip -before_install: pip install --upgrade pip setuptools +before_install: + - pip install --upgrade pip setuptools install: pip install -r requirements.txt before_script: - black --check . || true @@ -13,5 +14,4 @@ script: after_success: - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md - echo $TRAVIS_PULL_REQUEST && echo $TRAVIS_PULL_REQUEST_BRANCH - - git update-index --add --chmod=+x scripts/build_directory_md.py - - scripts/push_directory_md.sh \ No newline at end of file + - sh scripts/push_directory_md.sh \ No newline at end of file From 0ac923eeb7dbf1070c99b6bf26e5e44971eb75f8 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 14:55:58 -0400 Subject: [PATCH 11/18] add all --- scripts/push_directory_md.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/push_directory_md.sh b/scripts/push_directory_md.sh index f0e15631dff0..8a7aed27ff76 100644 --- a/scripts/push_directory_md.sh +++ b/scripts/push_directory_md.sh @@ -9,13 +9,13 @@ setup_git() { commit_website_files() { git checkout $TRAVIS_PULL_REQUEST_BRANCH - git add DIRECTORY.md + git add . git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" } upload_files() { git remote add origin https://${gh_token}@github.com/$TRAVIS_REPO_SLUG > /dev/null 2>&1 - git push --quiet --set-upstream origin $TRAVIS_PULL_REQUEST_BRANCH + git push --set-upstream origin $TRAVIS_PULL_REQUEST_BRANCH } setup_git From bbe8bd31c71539705544d29a5a62b97e99436aa3 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 15:04:29 -0400 Subject: [PATCH 12/18] add pull directory --- scripts/push_directory_md.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/push_directory_md.sh b/scripts/push_directory_md.sh index 8a7aed27ff76..c1b21fb7595a 100644 --- a/scripts/push_directory_md.sh +++ b/scripts/push_directory_md.sh @@ -15,7 +15,7 @@ commit_website_files() { upload_files() { git remote add origin https://${gh_token}@github.com/$TRAVIS_REPO_SLUG > /dev/null 2>&1 - git push --set-upstream origin $TRAVIS_PULL_REQUEST_BRANCH + git push origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_PULL_REQUEST_BRANCH } setup_git From dd4dd4e365027cd7d34bd317dc4a775e5f8a2970 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 15:10:22 -0400 Subject: [PATCH 13/18] fetch pr branch --- scripts/push_directory_md.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/push_directory_md.sh b/scripts/push_directory_md.sh index c1b21fb7595a..c88a90c519a1 100644 --- a/scripts/push_directory_md.sh +++ b/scripts/push_directory_md.sh @@ -8,6 +8,7 @@ setup_git() { } commit_website_files() { + git fetch origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_PULL_REQUEST_BRANCH git checkout $TRAVIS_PULL_REQUEST_BRANCH git add . git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" @@ -15,7 +16,7 @@ commit_website_files() { upload_files() { git remote add origin https://${gh_token}@github.com/$TRAVIS_REPO_SLUG > /dev/null 2>&1 - git push origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_PULL_REQUEST_BRANCH + git push origin $TRAVIS_PULL_REQUEST_BRANCH } setup_git From 78b7dabf3ab253c3e458f4df5234d0a2676f06dd Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 15:21:00 -0400 Subject: [PATCH 14/18] swap placement of adding commits --- scripts/push_directory_md.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/push_directory_md.sh b/scripts/push_directory_md.sh index c88a90c519a1..5ee84d467591 100644 --- a/scripts/push_directory_md.sh +++ b/scripts/push_directory_md.sh @@ -7,10 +7,10 @@ setup_git() { git config --global user.name "${gh_user}" } -commit_website_files() { +commit_directory_file() { + git add . git fetch origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_PULL_REQUEST_BRANCH git checkout $TRAVIS_PULL_REQUEST_BRANCH - git add . git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" } @@ -20,5 +20,5 @@ upload_files() { } setup_git -commit_website_files +commit_directory_file upload_files \ No newline at end of file From 92df8b941391bb14faa43b39397ba08bd059ce13 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 15:52:00 -0400 Subject: [PATCH 15/18] rotate --- scripts/push_directory_md.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/push_directory_md.sh b/scripts/push_directory_md.sh index 5ee84d467591..0e834d9f0ef6 100644 --- a/scripts/push_directory_md.sh +++ b/scripts/push_directory_md.sh @@ -9,9 +9,12 @@ setup_git() { commit_directory_file() { git add . + git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" +} + +fetch_get() { git fetch origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_PULL_REQUEST_BRANCH git checkout $TRAVIS_PULL_REQUEST_BRANCH - git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" } upload_files() { @@ -19,6 +22,7 @@ upload_files() { git push origin $TRAVIS_PULL_REQUEST_BRANCH } -setup_git commit_directory_file +setup_git +fetch_get upload_files \ No newline at end of file From bb63b2f75b2ed14b6953db428427ea8734bd25f0 Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 16:11:51 -0400 Subject: [PATCH 16/18] quit trying to update Travis --- .travis.yml | 4 +--- scripts/push_directory_md.sh | 28 ---------------------------- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 scripts/push_directory_md.sh diff --git a/.travis.yml b/.travis.yml index cd89738a0d87..cbde13ea3f17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,4 @@ script: - mypy --ignore-missing-imports . - pytest . --doctest-modules after_success: - - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md - - echo $TRAVIS_PULL_REQUEST && echo $TRAVIS_PULL_REQUEST_BRANCH - - sh scripts/push_directory_md.sh \ No newline at end of file + - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md \ No newline at end of file diff --git a/scripts/push_directory_md.sh b/scripts/push_directory_md.sh deleted file mode 100644 index 0e834d9f0ef6..000000000000 --- a/scripts/push_directory_md.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# Source: https://gist.github.com/willprice/e07efd73fb7f13f917ea - -setup_git() { - git config --global user.email "${gh_email}" - git config --global user.name "${gh_user}" -} - -commit_directory_file() { - git add . - git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" -} - -fetch_get() { - git fetch origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_PULL_REQUEST_BRANCH - git checkout $TRAVIS_PULL_REQUEST_BRANCH -} - -upload_files() { - git remote add origin https://${gh_token}@github.com/$TRAVIS_REPO_SLUG > /dev/null 2>&1 - git push origin $TRAVIS_PULL_REQUEST_BRANCH -} - -commit_directory_file -setup_git -fetch_get -upload_files \ No newline at end of file From b28fdf6f1eaa92c27bfacc8820d0eb5faa11a2ae Mon Sep 17 00:00:00 2001 From: "Marvin M. Michum" Date: Thu, 31 Oct 2019 19:42:50 -0400 Subject: [PATCH 17/18] formatting leftovers --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index cbde13ea3f17..accf69d1b1a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: python python: 3.7 cache: pip -before_install: - - pip install --upgrade pip setuptools +before_install: pip install --upgrade pip setuptools install: pip install -r requirements.txt before_script: - black --check . || true From 126b3a4f6d7f0ae43463fc5bc9af3716cc178f16 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 1 Nov 2019 04:05:50 +0100 Subject: [PATCH 18/18] Travis CI: Write & print DIRECTORY.md on one line --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index accf69d1b1a3..0c7c9fd0e1c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ script: - mypy --ignore-missing-imports . - pytest . --doctest-modules after_success: - - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md \ No newline at end of file + - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md