Skip to content

Commit 10d2741

Browse files
committed
test 3.10
1 parent 20793de commit 10d2741

File tree

2 files changed

+36
-39
lines changed

2 files changed

+36
-39
lines changed

.github/workflows/build.yaml

+32-37
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
max-parallel: 4
99
matrix:
1010
# python-version: ['3.8', '3.9', '3.10']
11-
python-version: ['3.8']
11+
python-version: ['3.10']
1212
os: [ubuntu-latest, macos-latest, windows-latest]
1313

1414
runs-on: ${{ matrix.os }}
@@ -41,11 +41,6 @@ jobs:
4141
python setup.py install
4242
python conda-recipe/run_test.py
4343
44-
# - uses: actions/upload-artifact@v2
45-
# with:
46-
# name: diffpy2-${{ matrix.os }}-${{ matrix.python-version }}
47-
# path: ${{ github.workspace }}/dist/*.whl
48-
4944
- name: Upload Artifacts GitHub releases
5045
uses: ncipollo/release-action@v1
5146
with:
@@ -58,34 +53,34 @@ jobs:
5853
tag: 1.4.0
5954
body: This is an alpha build of the pdffit2 library (1.4.0)
6055

61-
- name: Checkout target repo
62-
uses: actions/checkout@v3
63-
env:
64-
REPO: easyScience/pypi
65-
REPO_PATH: pypi
66-
with:
67-
fetch-depth: 0
68-
token: ${{ secrets.ES_TOKEN }}
69-
repository: ${{ env.REPO }}
70-
path: ${{ env.REPO_PATH }}
71-
ref: "pdffit" # temporarily, switch branch from master
72-
- name: Copy index to new repo
73-
env:
74-
SOURCE: index.html
75-
TARGET: pypi/pdffit2/
76-
run: cp ${{ env.SOURCE }} ${{ env.TARGET }}
77-
- name: Push
78-
env:
79-
REPO_PATH: pypi
80-
GIT_USERNAME: action
81-
GIT_EMAIL: [email protected]
82-
run: |
83-
cd ${{ env.REPO_PATH }}
84-
git config --local user.name "${{ env.GIT_USERNAME }}"
85-
git config --local user.email "${{ env.GIT_EMAIL }}"
86-
git add .
87-
if [[ `git status --porcelain` ]]; then
88-
git commit -m "Github Actions Automatically Built in `date +"%Y-%m-%d %H:%M"`"
89-
git push
90-
fi
91-
# fi
56+
# - name: Checkout target repo
57+
# uses: actions/checkout@v3
58+
# env:
59+
# REPO: easyScience/pypi
60+
# REPO_PATH: pypi
61+
# with:
62+
# fetch-depth: 0
63+
# token: ${{ secrets.ES_TOKEN }}
64+
# repository: ${{ env.REPO }}
65+
# path: ${{ env.REPO_PATH }}
66+
# ref: "pdffit" # temporarily, switch branch from master
67+
# - name: Copy index to new repo
68+
# env:
69+
# SOURCE: index.html
70+
# TARGET: pypi/pdffit2/
71+
# run: cp ${{ env.SOURCE }} ${{ env.TARGET }}
72+
# - name: Push
73+
# env:
74+
# REPO_PATH: pypi
75+
# GIT_USERNAME: action
76+
# GIT_EMAIL: [email protected]
77+
# run: |
78+
# cd ${{ env.REPO_PATH }}
79+
# git config --local user.name "${{ env.GIT_USERNAME }}"
80+
# git config --local user.email "${{ env.GIT_EMAIL }}"
81+
# git add .
82+
# if [[ `git status --porcelain` ]]; then
83+
# git commit -m "Github Actions Automatically Built in `date +"%Y-%m-%d %H:%M"`"
84+
# git push
85+
# fi
86+
# # fi

setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,16 @@
3131

3232

3333
def gitinfo():
34-
from subprocess import Popen, PIPE
34+
from subprocess import Popen, PIPE, check_output
3535
kw = dict(stdout=PIPE, cwd=MYDIR, universal_newlines=True)
3636
proc = Popen(['git', 'describe', '--tags', '--match=v[[:digit:]]*'], **kw)
3737
desc = proc.stdout.read()
3838
proc = Popen(['git', 'log', '-1', '--format=%H %ct %ci'], **kw)
3939
glog = proc.stdout.read()
4040
rv = {}
41-
rv['version'] = '.post'.join(desc.strip().split('-')[:2]).lstrip('v')
4241
rv['commit'], rv['timestamp'], rv['date'] = glog.strip().split(None, 2)
42+
version = check_output(['git', 'tag']).decode('ascii').strip()
43+
rv['version'] = version
4344
return rv
4445

4546

@@ -66,6 +67,7 @@ def getversioncfg():
6667
except OSError:
6768
pass
6869
# finally, check and update the active version file
70+
6971
cp = RawConfigParser()
7072
cp.read(versioncfgfile)
7173
d = cp.defaults()

0 commit comments

Comments
 (0)