From 4fd18b91ed298707d3d7292e247fbf1f2360927b Mon Sep 17 00:00:00 2001 From: Glutanimate Date: Fri, 3 Jan 2020 13:46:03 +0100 Subject: [PATCH 1/5] Add myself to CONTRIBUTORS --- CONTRIBUTORS | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index f41d0d36f..78417243b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -19,6 +19,7 @@ support site, it would be great if you could add your name below as well. ******************** Erez Volk +Aristotelis P. ******************** From 2fe250bcd57c700283cf4a25cd8b96973b1852e7 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 3 Jan 2020 19:39:27 +1000 Subject: [PATCH 2/5] split out rename-with-buildhash --- build | 5 +---- helpers/rename-with-buildhash | 9 +++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 helpers/rename-with-buildhash diff --git a/build b/build index af2421d4a..17d2f5ccd 100755 --- a/build +++ b/build @@ -11,7 +11,4 @@ for dir in $DEVEL; do (cd $dir && make build BUILDFLAGS="$BUILDFLAGS") done -# add build hash to outputs -ver=$(cat meta/version) -hash=$(cat meta/buildhash) -(cd dist && rename "s/$ver/${ver}+$hash/" *.whl) +helpers/rename-with-buildhash diff --git a/helpers/rename-with-buildhash b/helpers/rename-with-buildhash new file mode 100755 index 000000000..20663e129 --- /dev/null +++ b/helpers/rename-with-buildhash @@ -0,0 +1,9 @@ +#!/bin/bash + +# add buildhash to output files +top=$(dirname $0)/.. +ver=$(cat $top/meta/version) +hash=$(cat $top/meta/buildhash) +rename "s/-${ver}-/-${ver}+${hash}-/" $top/dist/* + + From 4133b14659cdd24067c626e5724ff353db324f6e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 3 Jan 2020 19:40:31 +1000 Subject: [PATCH 3/5] use 'python3' to create the venv, for systems still defaulting to v2 --- scripts.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts.inc b/scripts.inc index f04e28148..58e96718b 100644 --- a/scripts.inc +++ b/scripts.inc @@ -13,7 +13,7 @@ fi # activate venv if [ ! -d pyenv ]; then - python -m venv pyenv + python3 -m venv pyenv . pyenv/bin/activate pip install --upgrade pip setuptools else From 06f219ce33d7bbf2f1ddb31712e49994b727fd63 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 4 Jan 2020 07:35:22 +1000 Subject: [PATCH 4/5] add default value to ServerData --- pylib/anki/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylib/anki/storage.py b/pylib/anki/storage.py index 7556298fb..f95722cfd 100644 --- a/pylib/anki/storage.py +++ b/pylib/anki/storage.py @@ -23,7 +23,7 @@ from anki.utils import intTime, isWin class ServerData: - minutes_west: Optional[int] + minutes_west: Optional[int] = None def Collection( From 2cdac1d2f4873871f8bbc80025946487106f1c75 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 4 Jan 2020 08:04:22 +1000 Subject: [PATCH 5/5] check contributors automatically --- .github/workflows/contrib.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/contrib.yml diff --git a/.github/workflows/contrib.yml b/.github/workflows/contrib.yml new file mode 100644 index 000000000..45bb0f646 --- /dev/null +++ b/.github/workflows/contrib.yml @@ -0,0 +1,13 @@ +name: Author in CONTRIBUTORS + +on: [pull_request] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check + run: | + headAuthor=$(git log -1 --pretty=format:'%ae') + git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor"