Skip to content

Commit

Permalink
Fix hard coded variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ivandokov committed Jan 7, 2021
1 parent 8d823f8 commit b6d7745
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
LATEST_VERSION=`git tag | sort -t. -k 1.2,1n -k 2,2n -k 3,3n -k 4,4n | tail -1`
CURRENT_VERSION=`echo -e "import urllib.request, json\n\nrequest = urllib.request.Request('http://api.snapcraft.io/v2/snaps/info/phockup')\nrequest.add_header('Snap-Device-Series', '16')\narchitectures = {'amd64': 'linux/amd64', 'i386': 'linux/386', 'arm64': 'linux/arm64', 'armhf': 'linux/arm/v7', 'ppc64el': 'linux/ppc64le', 's390x': 'linux/s390x'}\nwith urllib.request.urlopen(request) as url:\n data = json.loads(url.read().decode())\n for c in data['channel-map']:\n channel = c['channel']\n if architectures.get(channel['architecture']) == 'linux/amd64' and channel['name'] == 'stable':\n print(c['version'])" | python3`
CURRENT_VERSION=`echo -e "import urllib.request, json\n\nrequest = urllib.request.Request('http://api.snapcraft.io/v2/snaps/info/phockup')\nrequest.add_header('Snap-Device-Series', '16')\narchitectures = {'amd64': 'linux/amd64', 'i386': 'linux/386', 'arm64': 'linux/arm64', 'armhf': 'linux/arm/v7', 'ppc64el': 'linux/ppc64le', 's390x': 'linux/s390x'}\nwith urllib.request.urlopen(request) as url:\n data = json.loads(url.read().decode())\n for c in data['channel-map']:\n channel = c['channel']\n if architectures.get(channel['architecture']) == ${{ matrix.architecture }} and channel['name'] == 'stable':\n print(c['version'])" | python3`
if [ "$LATEST_VERSION" = "$CURRENT_VERSION" ]; then
echo ::set-output name=deploy::0
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Changelog
##### `1.5.21`
* Fix hard coded variable
##### `1.5.20`
* When taking the current version for snaps get the version for the current architecture and for stable channel
##### `1.5.19`
Expand Down
2 changes: 1 addition & 1 deletion phockup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from src.printer import Printer


__version__ = "1.5.20"
__version__ = "1.5.21"

printer = Printer()

Expand Down

0 comments on commit b6d7745

Please sign in to comment.