Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chipforge_cli
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChipForge
chipforge_cli
Commits
cae60f69
Commit
cae60f69
authored
8 months ago
by
gling
Browse files
Options
Downloads
Patches
Plain Diff
Release 0.0.24
parent
a67ea6ec
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
chipforge/autoupdate.py
+2
-3
2 additions, 3 deletions
chipforge/autoupdate.py
chipforge/cli.py
+2
-1
2 additions, 1 deletion
chipforge/cli.py
pyproject.toml
+1
-1
1 addition, 1 deletion
pyproject.toml
with
5 additions
and
5 deletions
chipforge/autoupdate.py
+
2
−
3
View file @
cae60f69
import
os
import
click
import
importlib_metadata
from
.
import
colors
as
c
import
urllib.request
import
re
...
...
@@ -11,10 +10,10 @@ import pkg_resources
PACKAGE_NAME
=
'
chipforge
'
INDEX_URL
=
'
https://git.ece.iastate.edu/api/v4/projects/6561/packages/pypi/simple/
'
def
autoupdate
():
try
:
my_version
=
importlib_metadata
.
version
(
PACKAGE_NAME
)
chipforge
=
next
(
pkg
for
pkg
in
pkg_resources
.
working_set
if
pkg
.
key
==
PACKAGE_NAME
)
my_version
=
chipforge
.
version
(
my_major
,
my_minor
,
my_patch
)
=
(
int
(
i
)
for
i
in
my_version
.
split
(
'
.
'
))
with
urllib
.
request
.
urlopen
(
INDEX_URL
+
PACKAGE_NAME
)
as
file
:
...
...
This diff is collapsed.
Click to expand it.
chipforge/cli.py
+
2
−
1
View file @
cae60f69
...
...
@@ -3,6 +3,7 @@ import os
import
subprocess
import
click
import
importlib_metadata
import
pkg_resources
from
.autoupdate
import
autoupdate
...
...
@@ -12,7 +13,7 @@ from . import colors as c
def
get_version
():
try
:
return
importlib_metadata
.
version
(
'
chipforge
'
)
return
next
(
pkg
for
pkg
in
pkg_resources
.
working_set
if
pkg
.
key
==
'
chipforge
'
)
.
version
except
:
return
'
dev-
'
+
subprocess
.
check_output
([
'
git
'
,
'
rev-parse
'
,
'
--short
'
,
'
HEAD
'
],
encoding
=
'
ascii
'
).
strip
()
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
1
View file @
cae60f69
[tool.poetry]
name
=
"chipforge"
version
=
"0.0.2
3
"
version
=
"0.0.2
4
"
description
=
"Chip Forge Python Utilities"
repository
=
"https://git.ece.iastate.edu/isu-chip-fab/chiputil.git"
authors
=
[
"Gregory Ling"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment