mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 12:46:22 +01:00
Bump docker base image to 2.6.0 (#1245)
This commit is contained in:
parent
4e9a05fe11
commit
ccb6fc3010
2
.github/workflows/ci-docker.yml
vendored
2
.github/workflows/ci-docker.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up env variables
|
||||
run: |
|
||||
base_version="2.5.0"
|
||||
base_version="2.6.0"
|
||||
|
||||
if [[ "${{ matrix.build_type }}" == "hassio" ]]; then
|
||||
build_from="esphome/esphome-hassio-base-${{ matrix.arch }}:${base_version}"
|
||||
|
2
.github/workflows/release-dev.yml
vendored
2
.github/workflows/release-dev.yml
vendored
@ -190,7 +190,7 @@ jobs:
|
||||
echo "::set-env name=TAG::${TAG}"
|
||||
- name: Set up env variables
|
||||
run: |
|
||||
base_version="2.5.0"
|
||||
base_version="2.6.0"
|
||||
|
||||
if [[ "${{ matrix.build_type }}" == "hassio" ]]; then
|
||||
build_from="esphome/esphome-hassio-base-${{ matrix.arch }}:${base_version}"
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -210,7 +210,7 @@ jobs:
|
||||
echo "::set-env name=TAG::${TAG}"
|
||||
- name: Set up env variables
|
||||
run: |
|
||||
base_version="2.5.0"
|
||||
base_version="2.6.0"
|
||||
|
||||
if [[ "${{ matrix.build_type }}" == "hassio" ]]; then
|
||||
build_from="esphome/esphome-hassio-base-${{ matrix.arch }}:${base_version}"
|
||||
|
@ -1,4 +1,4 @@
|
||||
ARG BUILD_FROM=esphome/esphome-base-amd64:2.5.0
|
||||
ARG BUILD_FROM=esphome/esphome-base-amd64:2.6.0
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
# First install requirements to leverage caching when requirements don't change
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM esphome/esphome-base-amd64:2.5.0
|
||||
FROM esphome/esphome-base-amd64:2.6.0
|
||||
|
||||
COPY . .
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM esphome/esphome-lint-base:2.5.0
|
||||
FROM esphome/esphome-lint-base:2.6.0
|
||||
|
||||
COPY requirements.txt requirements_test.txt /
|
||||
RUN pip3 install --no-cache-dir -r /requirements.txt -r /requirements_test.txt
|
||||
|
@ -25,6 +25,7 @@ ARDUINO_VERSION_ESP32 = {
|
||||
# See also https://github.com/platformio/platform-espressif8266/releases
|
||||
ARDUINO_VERSION_ESP8266 = {
|
||||
'dev': 'https://github.com/platformio/platform-espressif8266.git',
|
||||
'2.7.4': 'espressif8266@2.6.2',
|
||||
'2.7.3': 'espressif8266@2.6.1',
|
||||
'2.7.2': 'espressif8266@2.6.0',
|
||||
'2.7.1': 'espressif8266@2.5.3',
|
||||
|
@ -44,7 +44,7 @@ validate_platform = cv.one_of(*ESP_PLATFORMS, upper=True)
|
||||
|
||||
PLATFORMIO_ESP8266_LUT = {
|
||||
**ARDUINO_VERSION_ESP8266,
|
||||
'RECOMMENDED': ARDUINO_VERSION_ESP8266['2.7.3'],
|
||||
'RECOMMENDED': ARDUINO_VERSION_ESP8266['2.7.4'],
|
||||
'LATEST': 'espressif8266',
|
||||
'DEV': ARDUINO_VERSION_ESP8266['dev'],
|
||||
}
|
||||
|
59
script/bump-docker-base-version.py
Executable file
59
script/bump-docker-base-version.py
Executable file
@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
def sub(path, pattern, repl, expected_count=1):
|
||||
with open(path) as fh:
|
||||
content = fh.read()
|
||||
content, count = re.subn(pattern, repl, content, flags=re.MULTILINE)
|
||||
if expected_count is not None:
|
||||
assert count == expected_count, f"Pattern {pattern} replacement failed!"
|
||||
with open(path, "wt") as fh:
|
||||
fh.write(content)
|
||||
|
||||
|
||||
def write_version(version: str):
|
||||
for p in [
|
||||
".github/workflows/ci-docker.yml",
|
||||
".github/workflows/release-dev.yml",
|
||||
".github/workflows/release.yml"
|
||||
]:
|
||||
sub(
|
||||
p,
|
||||
r'base_version=".*"',
|
||||
f'base_version="{version}"'
|
||||
)
|
||||
|
||||
sub(
|
||||
"docker/Dockerfile",
|
||||
r"ARG BUILD_FROM=esphome/esphome-base-amd64:.*",
|
||||
f"ARG BUILD_FROM=esphome/esphome-base-amd64:{version}"
|
||||
)
|
||||
sub(
|
||||
"docker/Dockerfile.dev",
|
||||
r"FROM esphome/esphome-base-amd64:.*",
|
||||
f"FROM esphome/esphome-base-amd64:{version}"
|
||||
)
|
||||
sub(
|
||||
"docker/Dockerfile.lint",
|
||||
r"FROM esphome/esphome-lint-base:.*",
|
||||
f"FROM esphome/esphome-lint-base:{version}"
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('new_version', type=str)
|
||||
args = parser.parse_args()
|
||||
|
||||
version = args.new_version
|
||||
print(f"Bumping to {version}")
|
||||
write_version(version)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main() or 0)
|
Loading…
Reference in New Issue
Block a user