mirror of
https://github.com/gorhill/uBlock.git
synced 2024-08-31 16:19:39 +02:00
Use version number in the filename of packages
This commit is contained in:
parent
f1567ee272
commit
d528f3811a
@ -4,13 +4,13 @@ env:
|
|||||||
matrix:
|
matrix:
|
||||||
- BROWSER=chromium EXT=zip
|
- BROWSER=chromium EXT=zip
|
||||||
- BROWSER=firefox EXT=xpi
|
- BROWSER=firefox EXT=xpi
|
||||||
script: ./tools/make-${BROWSER}.sh all
|
script: ./tools/make-${BROWSER}.sh ${TRAVIS_TAG}
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
prerelease: true
|
prerelease: true
|
||||||
api_key:
|
api_key:
|
||||||
secure: EnAMNsPbnS2I0JDkCWiY/6WLERsUbE2Ni5j9ap8YbZt4+sJv7aSoufWZ+0TZvSwr/w5MKCCDKhwXaPfbUwvqrI+eZv6LBXhwajK9Zla25FVjtdGCwKXQ3ZU85PHgL+5FYtuSGACmQj/ruAdSgrI7PgS08e5lqSgEk6lY4y3/6fE=
|
secure: EnAMNsPbnS2I0JDkCWiY/6WLERsUbE2Ni5j9ap8YbZt4+sJv7aSoufWZ+0TZvSwr/w5MKCCDKhwXaPfbUwvqrI+eZv6LBXhwajK9Zla25FVjtdGCwKXQ3ZU85PHgL+5FYtuSGACmQj/ruAdSgrI7PgS08e5lqSgEk6lY4y3/6fE=
|
||||||
file: dist/build/uBlock0.${BROWSER}.${EXT}
|
file: dist/build/uBlock0_${TRAVIS_TAG}.${BROWSER}.${EXT}
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
repo: gorhill/uBlock
|
repo: gorhill/uBlock
|
||||||
|
14
dist/chromium/publish-beta.py
vendored
14
dist/chromium/publish-beta.py
vendored
@ -27,13 +27,6 @@ projdir = os.path.split(os.path.abspath(__file__))[0]
|
|||||||
while not os.path.isdir(os.path.join(projdir, '.git')):
|
while not os.path.isdir(os.path.join(projdir, '.git')):
|
||||||
projdir = os.path.normpath(os.path.join(projdir, '..'))
|
projdir = os.path.normpath(os.path.join(projdir, '..'))
|
||||||
|
|
||||||
cs_extension_id = 'cgbcahbpdhpcegmbfconppldiemgcoii'
|
|
||||||
tmpdir = tempfile.TemporaryDirectory()
|
|
||||||
raw_zip_filename = 'uBlock0.chromium.zip'
|
|
||||||
raw_zip_filepath = os.path.join(tmpdir.name, raw_zip_filename)
|
|
||||||
github_owner = 'gorhill'
|
|
||||||
github_repo = 'uBlock'
|
|
||||||
|
|
||||||
# We need a version string to work with
|
# We need a version string to work with
|
||||||
if len(sys.argv) >= 2 and sys.argv[1]:
|
if len(sys.argv) >= 2 and sys.argv[1]:
|
||||||
version = sys.argv[1]
|
version = sys.argv[1]
|
||||||
@ -44,6 +37,13 @@ if not re.search('^\d+\.\d+\.\d+(b|rc)\d+$', version):
|
|||||||
print('Error: Invalid version string.')
|
print('Error: Invalid version string.')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
cs_extension_id = 'cgbcahbpdhpcegmbfconppldiemgcoii'
|
||||||
|
tmpdir = tempfile.TemporaryDirectory()
|
||||||
|
raw_zip_filename = 'uBlock0_' + version + '.chromium.zip'
|
||||||
|
raw_zip_filepath = os.path.join(tmpdir.name, raw_zip_filename)
|
||||||
|
github_owner = 'gorhill'
|
||||||
|
github_repo = 'uBlock'
|
||||||
|
|
||||||
# Load/save auth secrets
|
# Load/save auth secrets
|
||||||
# The build directory is excluded from git
|
# The build directory is excluded from git
|
||||||
ubo_secrets = dict()
|
ubo_secrets = dict()
|
||||||
|
20
dist/firefox/publish-signed-beta.py
vendored
20
dist/firefox/publish-signed-beta.py
vendored
@ -42,16 +42,6 @@ if not os.path.isfile(version_filepath):
|
|||||||
print('Version file not found.')
|
print('Version file not found.')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
extension_id = 'uBlock0@raymondhill.net'
|
|
||||||
tmpdir = tempfile.TemporaryDirectory()
|
|
||||||
raw_xpi_filename = 'uBlock0.firefox.xpi'
|
|
||||||
raw_xpi_filepath = os.path.join(tmpdir.name, raw_xpi_filename)
|
|
||||||
unsigned_xpi_filepath = os.path.join(tmpdir.name, 'uBlock0.firefox.unsigned.xpi')
|
|
||||||
signed_xpi_filename = 'uBlock0.firefox.signed.xpi'
|
|
||||||
signed_xpi_filepath = os.path.join(tmpdir.name, signed_xpi_filename)
|
|
||||||
github_owner = 'gorhill'
|
|
||||||
github_repo = 'uBlock'
|
|
||||||
|
|
||||||
# We need a version string to work with
|
# We need a version string to work with
|
||||||
if len(sys.argv) >= 2 and sys.argv[1]:
|
if len(sys.argv) >= 2 and sys.argv[1]:
|
||||||
tag_version = sys.argv[1]
|
tag_version = sys.argv[1]
|
||||||
@ -69,6 +59,16 @@ if match.group(2):
|
|||||||
revision += 100;
|
revision += 100;
|
||||||
ext_version += '.' + str(revision)
|
ext_version += '.' + str(revision)
|
||||||
|
|
||||||
|
extension_id = 'uBlock0@raymondhill.net'
|
||||||
|
tmpdir = tempfile.TemporaryDirectory()
|
||||||
|
raw_xpi_filename = 'uBlock0_' + tag_version + '.firefox.xpi'
|
||||||
|
raw_xpi_filepath = os.path.join(tmpdir.name, raw_xpi_filename)
|
||||||
|
unsigned_xpi_filepath = os.path.join(tmpdir.name, 'uBlock0.firefox.unsigned.xpi')
|
||||||
|
signed_xpi_filename = 'uBlock0_' + tag_version + '.firefox.signed.xpi'
|
||||||
|
signed_xpi_filepath = os.path.join(tmpdir.name, signed_xpi_filename)
|
||||||
|
github_owner = 'gorhill'
|
||||||
|
github_repo = 'uBlock'
|
||||||
|
|
||||||
# Load/save auth secrets
|
# Load/save auth secrets
|
||||||
# The build directory is excluded from git
|
# The build directory is excluded from git
|
||||||
ubo_secrets = dict()
|
ubo_secrets = dict()
|
||||||
|
2
dist/firefox/updates.template.json
vendored
2
dist/firefox/updates.template.json
vendored
@ -6,7 +6,7 @@
|
|||||||
"version": "$ext_version",
|
"version": "$ext_version",
|
||||||
"applications": { "gecko": { "strict_min_version": "52" } },
|
"applications": { "gecko": { "strict_min_version": "52" } },
|
||||||
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/$tag_version",
|
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/$tag_version",
|
||||||
"update_link": "https://github.com/gorhill/uBlock/releases/download/$tag_version/uBlock0.firefox.signed.xpi"
|
"update_link": "https://github.com/gorhill/uBlock/releases/download/$tag_version/uBlock0_$tag_version.firefox.signed.xpi"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,15 @@ echo "*** uBlock0.chromium: Generating meta..."
|
|||||||
python tools/make-chromium-meta.py $DES/
|
python tools/make-chromium-meta.py $DES/
|
||||||
|
|
||||||
if [ "$1" = all ]; then
|
if [ "$1" = all ]; then
|
||||||
echo "*** uBlock0.chromium: Creating package..."
|
echo "*** uBlock0.chromium: Creating plain package..."
|
||||||
pushd $(dirname $DES/) > /dev/null
|
pushd $(dirname $DES/) > /dev/null
|
||||||
zip uBlock0.chromium.zip -qr $(basename $DES/)/*
|
zip uBlock0.chromium.zip -qr $(basename $DES/)/*
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
elif [ -n "$1" ]; then
|
||||||
|
echo "*** uBlock0.chromium: Creating versioned package..."
|
||||||
|
pushd $(dirname $DES/) > /dev/null
|
||||||
|
zip uBlock0_"$1".chromium.zip -qr $(basename $DES/)/*
|
||||||
|
popd > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "*** uBlock0.chromium: Package done."
|
echo "*** uBlock0.chromium: Package done."
|
||||||
|
@ -53,6 +53,11 @@ if [ "$1" = all ]; then
|
|||||||
pushd $DES > /dev/null
|
pushd $DES > /dev/null
|
||||||
zip ../$(basename $DES).xpi -qr *
|
zip ../$(basename $DES).xpi -qr *
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
elif [ -n "$1" ]; then
|
||||||
|
echo "*** uBlock0.firefox: Creating versioned package..."
|
||||||
|
pushd $DES > /dev/null
|
||||||
|
zip ../$(basename $DES).xpi -qr * -O ../uBlock0_"$1".firefox.xpi
|
||||||
|
popd > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "*** uBlock0.firefox: Package done."
|
echo "*** uBlock0.firefox: Package done."
|
||||||
|
@ -55,6 +55,11 @@ if [ "$1" = all ]; then
|
|||||||
pushd $DES > /dev/null
|
pushd $DES > /dev/null
|
||||||
zip ../$(basename $DES).xpi -qr *
|
zip ../$(basename $DES).xpi -qr *
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
elif [ -n "$1" ]; then
|
||||||
|
echo "*** uBlock0.webext: Creating versioned package..."
|
||||||
|
pushd $DES > /dev/null
|
||||||
|
zip ../$(basename $DES).xpi -qr * -O ../uBlock0_"$1".webext.xpi
|
||||||
|
popd > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "*** uBlock0.webext: Package done."
|
echo "*** uBlock0.webext: Package done."
|
||||||
|
Loading…
Reference in New Issue
Block a user