Skip to content

Commit

Permalink
7310
Browse files Browse the repository at this point in the history
  • Loading branch information
willsALMANJ committed Oct 28, 2017
1 parent a5a80bd commit 1b92bd2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
6 changes: 4 additions & 2 deletions max_firefox_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ def main():
for version in version_list:
# Match newest version without prerelease characters in string
if re.match(r'^[0-9\.]+$', version):
print(version)
return
if int(version.split('.')[0]) < 57:
# Get the latest release lest than 57
print(version)
return

raise RuntimeError('No version strings found')

Expand Down
6 changes: 3 additions & 3 deletions update.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<rdf:Seq>
<rdf:li>
<rdf:Description>
<em:version>7307</em:version>
<em:version>7310</em:version>
<em:targetApplication>
<rdf:Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>34.0</em:minVersion>
<em:maxVersion>54.0</em:maxVersion>
<em:updateLink>https://github.com/willsALMANJ/pentadactyl-signed/releases/download/7307/pentadactyl-signed-7307.xpi</em:updateLink>
<em:maxVersion>56.*</em:maxVersion>
<em:updateLink>https://github.com/willsALMANJ/pentadactyl-signed/releases/download/7310/pentadactyl-signed-7310.xpi</em:updateLink>
</rdf:Description>
</em:targetApplication>
</rdf:Description>
Expand Down
18 changes: 9 additions & 9 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cd "$DIR"


# Set up variables
last_version="$(git tag -l --sort=v:refname | tail -1)"
last_version="$(git tag | egrep '^[0-9]{4}[0-9]*$' | sort -n | tail -1)"
amo_secret="$(cat amo.secret)"
amo_key="$(cat amo.key)"
github_token="$(cat github.token)"
Expand All @@ -45,18 +45,17 @@ github_repo="$(cat github_repo.txt)"

# Update dactyl source
cd dactyl
hg revert --all
hg pull
hg update
# git reset --hard
# git checkout master
# git pull

# Get version number and exit if no changes
version="$(hg log -r . --template '{rev}')"
if [ "$last_version" = "$version" ]; then
exit 0
fi
# New version number
version=$(expr $last_version + 1)
version=7310

# Get max Firefox version
max_fx_version="$(python "${DIR}"/max_firefox_version.py)"
max_fx_version='56.*'

# Modify install.rdf to change id, update URL, and max Firefox version
sed -e 's/em:id="[email protected]"/em:id="'"$addon_id"'"/' \
Expand Down Expand Up @@ -90,6 +89,7 @@ sed -e 's#<em:updateLink>.*</em:updateLink>#<em:updateLink>https://github.com/'"
-i "${DIR}/update.rdf"

# Push new update.rdf to GitHub
cd "${DIR}"
git commit -a -m "$version"
git push
git tag "$version"
Expand Down

0 comments on commit 1b92bd2

Please sign in to comment.