Compare commits

...

3 Commits

Author SHA1 Message Date
Sebastien
5e5c7e0c80 Merge branch 'master-v4.3' of https://github.com/sle118/squeezelite-esp32 into master-v4.3 2022-11-24 09:07:45 -05:00
Sebastien
3144cf5f91 Change auth methods for pushing 2022-11-24 09:07:35 -05:00
github-actions
18cc0adfb4 Update prebuilt objects [skip actions] 2022-11-22 15:28:59 +00:00
18 changed files with 38 additions and 27 deletions

View File

@@ -90,6 +90,7 @@ RUN : \
&& pip show pygit2 \
&& python --version \
&& pip --version \
&& pip3 install protobuf grpcio-tools \
&& rm -rf $IDF_TOOLS_PATH/dist \
&& :

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -15,6 +15,7 @@ declare function getStatus(): {};
declare function getStatus(): {};
declare function getStatus(): {};
declare function getStatus(): {};
declare function getStatus(): {};
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
@@ -32,6 +33,8 @@ declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function getRadioButton(entry: any): string;
declare function pushStatus(): void;
declare function pushStatus(): void;
declare function pushStatus(): void;
declare function pushStatus(): void;

View File

@@ -1,5 +1,5 @@
target_add_binary_data( __idf_wifi-manager webapp/dist/css/index.7964a13ec910c36040b8.css.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/favicon-32x32.png BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/index.html.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/js/index.9b00af.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/js/node_vendors.9b00af.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/js/index.708f2f.bundle.js.gz BINARY)
target_add_binary_data( __idf_wifi-manager webapp/dist/js/node_vendors.708f2f.bundle.js.gz BINARY)

View File

@@ -6,29 +6,29 @@ extern const uint8_t _favicon_32x32_png_start[] asm("_binary_favicon_32x32_png_s
extern const uint8_t _favicon_32x32_png_end[] asm("_binary_favicon_32x32_png_end");
extern const uint8_t _index_html_gz_start[] asm("_binary_index_html_gz_start");
extern const uint8_t _index_html_gz_end[] asm("_binary_index_html_gz_end");
extern const uint8_t _index_9b00af_bundle_js_gz_start[] asm("_binary_index_9b00af_bundle_js_gz_start");
extern const uint8_t _index_9b00af_bundle_js_gz_end[] asm("_binary_index_9b00af_bundle_js_gz_end");
extern const uint8_t _node_vendors_9b00af_bundle_js_gz_start[] asm("_binary_node_vendors_9b00af_bundle_js_gz_start");
extern const uint8_t _node_vendors_9b00af_bundle_js_gz_end[] asm("_binary_node_vendors_9b00af_bundle_js_gz_end");
extern const uint8_t _index_708f2f_bundle_js_gz_start[] asm("_binary_index_708f2f_bundle_js_gz_start");
extern const uint8_t _index_708f2f_bundle_js_gz_end[] asm("_binary_index_708f2f_bundle_js_gz_end");
extern const uint8_t _node_vendors_708f2f_bundle_js_gz_start[] asm("_binary_node_vendors_708f2f_bundle_js_gz_start");
extern const uint8_t _node_vendors_708f2f_bundle_js_gz_end[] asm("_binary_node_vendors_708f2f_bundle_js_gz_end");
const char * resource_lookups[] = {
"/css/index.7964a13ec910c36040b8.css.gz",
"/favicon-32x32.png",
"/index.html.gz",
"/js/index.9b00af.bundle.js.gz",
"/js/node_vendors.9b00af.bundle.js.gz",
"/js/index.708f2f.bundle.js.gz",
"/js/node_vendors.708f2f.bundle.js.gz",
""
};
const uint8_t * resource_map_start[] = {
_index_7964a13ec910c36040b8_css_gz_start,
_favicon_32x32_png_start,
_index_html_gz_start,
_index_9b00af_bundle_js_gz_start,
_node_vendors_9b00af_bundle_js_gz_start
_index_708f2f_bundle_js_gz_start,
_node_vendors_708f2f_bundle_js_gz_start
};
const uint8_t * resource_map_end[] = {
_index_7964a13ec910c36040b8_css_gz_end,
_favicon_32x32_png_end,
_index_html_gz_end,
_index_9b00af_bundle_js_gz_end,
_node_vendors_9b00af_bundle_js_gz_end
_index_708f2f_bundle_js_gz_end,
_node_vendors_708f2f_bundle_js_gz_end
};

View File

@@ -1,6 +1,6 @@
/***********************************
webpack_headers
dist/css/index.7964a13ec910c36040b8.css.gz,dist/favicon-32x32.png,dist/index.html.gz,dist/js/index.9b00af.bundle.js.gz,dist/js/node_vendors.9b00af.bundle.js.gz
dist/css/index.7964a13ec910c36040b8.css.gz,dist/favicon-32x32.png,dist/index.html.gz,dist/js/index.708f2f.bundle.js.gz,dist/js/node_vendors.708f2f.bundle.js.gz
***********************************/
#pragma once
#include <inttypes.h>

View File

@@ -517,7 +517,7 @@ class Releases():
print(f'Opening repository from {path}')
cls.repo = Repository(path=path)
except GitError as ex:
print_error(f"Unable to access the repository.\nContent of {path}:\n{NEWLINE_CHAR.join(get_file_list(path, 1))}")
print_error(f"Unable to access the repository({ex}).\nContent of {path}:\n{NEWLINE_CHAR.join(get_file_list(path, 1))}")
raise
return cls.repo
@@ -844,6 +844,14 @@ def get_changed_items(repo: Repository) -> Dict:
def is_dirty(repo: Repository) -> bool:
return len(get_changed_items(repo)) > 0
def push_with_method(auth_method:str,token:str,remote: Remote,reference):
success:bool = False
try:
remote.push(reference, callbacks=RemoteCallbacks(pygit2.UserPass(auth_method, token)))
success=True
except Exception as ex:
print_error(f'Error pushing with auth method {auth_method}: {ex}.')
return success
def push_if_change(repo: Repository, token: str, source_path: str, manif_json):
if is_dirty(repo):
@@ -861,15 +869,14 @@ def push_if_change(repo: Repository, token: str, source_path: str, manif_json):
origin: Remote = repo.remotes['origin']
print(
f'Pushing commit {format_commit(repo[commit])} to url {origin.url}')
credentials = UserPass(token, 'x-oauth-basic') # passing credentials
remote: Remote = repo.remotes['origin']
# remote.credentials = credentials
auth_method = 'x-access-token'
remote.push([reference], callbacks=RemoteCallbacks(
pygit2.UserPass(auth_method, token)))
print(
f'::notice Web installer updated for {format_artifact_from_manifest(manif_json)}')
auth_methods = ['x-access-token','x-oauth-basic']
for method in auth_methods:
if push_with_method('x-access-token', token, remote, [reference]):
print(f'::notice Web installer updated for {format_artifact_from_manifest(manif_json)}')
return
raise Exception('Unable to push web installer changes to installer repo')
else:
print(f'WARNING: No change found. Skipping update')

Binary file not shown.

BIN
server_certs/rootca1.cer.18 Normal file

Binary file not shown.