Skip to content

Commit a0ced07

Browse files
committed
Merge branch 'master' into feature/multiplePartImage#t2
2 parents c4b209f + 442a616 commit a0ced07

File tree

83 files changed

+1853
-580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1853
-580
lines changed

.github/workflows/qc_checks.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
- name: Export API Documentation
177177
run: invoke dev.schema --ignore-warnings --filename src/backend/InvenTree/schema.yml
178178
- name: Upload schema
179-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4.6.2
179+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # pin@v5.0.0
180180
with:
181181
name: schema.yml
182182
path: src/backend/InvenTree/schema.yml
@@ -225,17 +225,17 @@ jobs:
225225
- name: Extract settings / tags
226226
run: invoke int.export-definitions --basedir docs
227227
- name: Upload settings
228-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4.6.2
228+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # pin@v5.0.0
229229
with:
230230
name: inventree_settings.json
231231
path: docs/generated/inventree_settings.json
232232
- name: Upload tags
233-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4.6.2
233+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # pin@v5.0.0
234234
with:
235235
name: inventree_tags.yml
236236
path: docs/generated/inventree_tags.yml
237237
- name: Upload filters
238-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4.6.2
238+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # pin@v5.0.0
239239
with:
240240
name: inventree_filters.yml
241241
path: docs/generated/inventree_filters.yml
@@ -258,7 +258,7 @@ jobs:
258258
- name: Create artifact directory
259259
run: mkdir -p artifact
260260
- name: Download schema artifact
261-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # pin@v5.0.0
261+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # pin@v6.0.0
262262
with:
263263
path: artifact
264264
merge-multiple: true
@@ -364,7 +364,7 @@ jobs:
364364
- name: Coverage Tests
365365
run: invoke dev.test --check --coverage --translations
366366
- name: Upload raw coverage to artifacts
367-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4.6.2
367+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # pin@v5.0.0
368368
with:
369369
name: coverage
370370
path: .coverage
@@ -635,7 +635,7 @@ jobs:
635635
- name: Run Playwright tests
636636
id: tests
637637
run: cd src/frontend && npx nyc playwright test
638-
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4.6.2
638+
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # pin@v5.0.0
639639
if: ${{ !cancelled() && steps.tests.outcome == 'failure' }}
640640
with:
641641
name: playwright-report
@@ -680,7 +680,7 @@ jobs:
680680
run: |
681681
cd src/backend/InvenTree/web/static
682682
zip -r frontend-build.zip web/ web/.vite
683-
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4.6.2
683+
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # pin@v5.0.0
684684
with:
685685
name: frontend-build
686686
path: src/backend/InvenTree/web/static/web
@@ -705,7 +705,7 @@ jobs:
705705
env:
706706
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
707707
- name: Upload SARIF file
708-
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # pin@v3
708+
uses: github/codeql-action/upload-sarif@4e94bd11f71e507f7f87df81788dff88d1dacbfb # pin@v3
709709
with:
710710
sarif_file: results.sarif
711711
category: zizmor

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Build frontend
5656
run: cd src/frontend && npm run compile && npm run build
5757
- name: Create SBOM for frontend
58-
uses: anchore/sbom-action@aa0e114b2e19480f157109b9922bda359bd98b90 # pin@v0
58+
uses: anchore/sbom-action@8e94d75ddd33f69f691467e42275782e4bfefe84 # pin@v0
5959
with:
6060
artifact-name: frontend-build.spdx
6161
path: src/frontend

.github/workflows/scorecard.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ jobs:
5959
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6060
# format to the repository Actions tab.
6161
- name: "Upload artifact"
62-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
62+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6363
with:
6464
name: SARIF file
6565
path: results.sarif
6666
retention-days: 5
6767

6868
# Upload the results to GitHub's code scanning dashboard.
6969
- name: "Upload to code-scanning"
70-
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
70+
uses: github/codeql-action/upload-sarif@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v4.31.0
7171
with:
7272
sarif_file: results.sarif

.pkgr.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: inventree
22
description: Open Source Inventory Management System
33
homepage: https://inventree.org
44
notifications: true
5-
buildpack: https://github.com/mjmair/heroku-buildpack-python#v216-mjmair
5+
buildpack: https://github.com/matmair/null-buildpack#master
66
env:
7-
- STACK=heroku-20
8-
- DISABLE_COLLECTSTATIC=1
97
- INVENTREE_DB_ENGINE=sqlite3
108
- INVENTREE_DB_NAME=database.sqlite3
119
- INVENTREE_PLUGINS_ENABLED
@@ -38,4 +36,7 @@ dependencies:
3836
- "libffi7 | libffi8"
3937
targets:
4038
ubuntu-20.04: true
39+
ubuntu-22.04: true
40+
ubuntu-24.04: true
4141
debian-11: true
42+
debian-12: true

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
- Adds optional shipping address against individual sales order shipments in [#10650](https://github.com/inventree/InvenTree/pull/10650)
2020
- Adds UI elements to "check" and "uncheck" sales order shipments in [#10654](https://github.com/inventree/InvenTree/pull/10654)
2121
- Allow assigning project codes to order line items in [#10657](https://github.com/inventree/InvenTree/pull/10657)
22+
- Added support for webauthn login for the frontend in [#9729](https://github.com/inventree/InvenTree/pull/9729)
23+
- Added support for Debian 12, Ubuntu 22.04 and Ubuntu 24.04 in the installer and package in [#10705](https://github.com/inventree/InvenTree/pull/10705)
24+
- Support for S3 and SFTP storage backends for media and static files ([#10140](https://github.com/inventree/InvenTree/pull/10140))
25+
- Adds hooks for custom UI spotlight actions in [#10720](https://github.com/inventree/InvenTree/pull/10720)
26+
- Support uploading attachments against SupplierPart in [#10724](https://github.com/inventree/InvenTree/pull/10724)
2227

2328
### Changed
2429

contrib/dev_reqs/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Packages needed for CI/packages
22
requests==2.32.5
33
pyyaml==6.0.3
4-
jc==1.25.5
4+
jc==1.25.6

contrib/dev_reqs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ idna==3.11 \
123123
--hash=sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea \
124124
--hash=sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902
125125
# via requests
126-
jc==1.25.5 \
127-
--hash=sha256:a2ec1e7bcadeb977f278b36a1619d85ea9070ab2b81aba74b7ee2c36470c3f8f \
128-
--hash=sha256:f8ac0e4bc427b0ee8a3bdb07a254cc9df6b6036cd440f6c425e2e519cdbda78a
126+
jc==1.25.6 \
127+
--hash=sha256:27f58befc7ae0a4c63322926c5f1ec892e3eac4a065eff3b07cfe420a6924a07 \
128+
--hash=sha256:7367b59e6e0da8babeede1e5b0da083f3c5aa6b6e585b4aed28dd7c4b2d76162
129129
# via -r contrib/dev_reqs/requirements.in
130130
pygments==2.19.2 \
131131
--hash=sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887 \

contrib/install.sh

Lines changed: 32 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env bash
2-
# This script was generated by bashly 1.1.1 (https://bashly.dannyb.co)
2+
# This script was generated by bashly 1.3.3 (https://bashly.dev)
33
# Modifying it manually is not recommended
44

5-
if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then
6-
printf "bash version 4 or higher is required\n" >&2
5+
if ((BASH_VERSINFO[0] < 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 2))); then
6+
printf "bash version 4.2 or higher is required\n" >&2
77
exit 1
88
fi
99

@@ -56,17 +56,16 @@ root_command() {
5656
get_distribution
5757
echo "### Detected distribution: $OS $VER"
5858
SUPPORTED=true # is this OS supported?
59-
NEEDS_LIBSSL1_1=false # does this OS need libssl1.1?
6059

6160
DIST_OS=${OS,,}
6261
DIST_VER=$VER
6362

6463
case "$OS" in
6564
Ubuntu)
65+
if [[ $VER == "24.04" ]]; then
66+
SUPPORTED=true
6667
if [[ $VER == "22.04" ]]; then
6768
SUPPORTED=true
68-
NEEDS_LIBSSL1_1=true
69-
DIST_VER="20.04"
7069
elif [[ $VER == "20.04" ]]; then
7170
SUPPORTED=true
7271
else
@@ -75,7 +74,6 @@ root_command() {
7574
;;
7675
"Debian GNU/Linux" | "debian gnu/linux" | Raspbian)
7776
if [[ $VER == "12" ]]; then
78-
DIST_VER="11"
7977
SUPPORTED=true
8078
elif [[ $VER == "11" ]]; then
8179
SUPPORTED=true
@@ -111,15 +109,6 @@ root_command() {
111109
fi
112110
done
113111

114-
if [[ $NEEDS_LIBSSL1_1 == "true" ]]; then
115-
echo "### Installing libssl1.1"
116-
117-
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
118-
do_call "sudo apt-get update"
119-
do_call "sudo apt-get install libssl1.1"
120-
sudo rm /etc/apt/sources.list.d/focal-security.list
121-
fi
122-
123112
echo "### Getting and adding key"
124113
curl -fsSL https://dl.packager.io/srv/$publisher/InvenTree/key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/pkgr-inventree.gpg > /dev/null
125114
echo "### Adding package source"
@@ -146,23 +135,15 @@ version_command() {
146135
}
147136

148137
install.sh_usage() {
149-
if [[ -n $long_usage ]]; then
150-
printf "install.sh - Interactive installer for InvenTree\n"
151-
echo
152-
153-
else
154-
printf "install.sh - Interactive installer for InvenTree\n"
155-
echo
156-
157-
fi
138+
printf "install.sh - Interactive installer for InvenTree\n\n"
158139

159140
printf "%s\n" "Usage:"
160141
printf " install.sh [SOURCE] [PUBLISHER] [OPTIONS]\n"
161142
printf " install.sh --help | -h\n"
162143
printf " install.sh --version | -v\n"
163144
echo
164145

165-
if [[ -n $long_usage ]]; then
146+
if [[ -n "$long_usage" ]]; then
166147
printf "%s\n" "Options:"
167148

168149
printf " %s\n" "--no-call, -n"
@@ -184,13 +165,13 @@ install.sh_usage() {
184165

185166
printf " %s\n" "SOURCE"
186167
printf " Package source that should be used\n"
187-
printf " Allowed: stable, master, main\n"
188-
printf " Default: stable\n"
168+
printf " %s\n" "Allowed: stable, master, main"
169+
printf " %s\n" "Default: stable"
189170
echo
190171

191172
printf " %s\n" "PUBLISHER"
192173
printf " Publisher that should be used\n"
193-
printf " Default: inventree\n"
174+
printf " %s\n" "Default: inventree"
194175
echo
195176

196177
printf "%s\n" "Examples:"
@@ -203,11 +184,14 @@ install.sh_usage() {
203184
}
204185

205186
normalize_input() {
206-
local arg flags
187+
local arg passthru flags
188+
passthru=false
207189

208190
while [[ $# -gt 0 ]]; do
209191
arg="$1"
210-
if [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then
192+
if [[ $passthru == true ]]; then
193+
input+=("$arg")
194+
elif [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then
211195
input+=("${BASH_REMATCH[1]}")
212196
input+=("${BASH_REMATCH[2]}")
213197
elif [[ $arg =~ ^(-[a-zA-Z0-9])=(.+)$ ]]; then
@@ -218,6 +202,9 @@ normalize_input() {
218202
for ((i = 0; i < ${#flags}; i++)); do
219203
input+=("-${flags:i:1}")
220204
done
205+
elif [[ "$arg" == "--" ]]; then
206+
passthru=true
207+
input+=("$arg")
221208
else
222209
input+=("$arg")
223210
fi
@@ -226,37 +213,11 @@ normalize_input() {
226213
done
227214
}
228215

229-
inspect_args() {
230-
if ((${#args[@]})); then
231-
readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort)
232-
echo args:
233-
for k in "${sorted_keys[@]}"; do echo "- \${args[$k]} = ${args[$k]}"; done
234-
else
235-
echo args: none
236-
fi
237-
238-
if ((${#other_args[@]})); then
239-
echo
240-
echo other_args:
241-
echo "- \${other_args[*]} = ${other_args[*]}"
242-
for i in "${!other_args[@]}"; do
243-
echo "- \${other_args[$i]} = ${other_args[$i]}"
244-
done
245-
fi
246-
247-
if ((${#deps[@]})); then
248-
readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort)
249-
echo
250-
echo deps:
251-
for k in "${sorted_keys[@]}"; do echo "- \${deps[$k]} = ${deps[$k]}"; done
252-
fi
253-
254-
}
255-
256216
parse_requirements() {
257217

258218
while [[ $# -gt 0 ]]; do
259-
case "${1:-}" in
219+
key="$1"
220+
case "$key" in
260221
--version | -v)
261222
version_command
262223
exit
@@ -301,11 +262,10 @@ parse_requirements() {
301262
*)
302263

303264
if [[ -z ${args['source']+x} ]]; then
304-
305265
args['source']=$1
306266
shift
307-
elif [[ -z ${args['publisher']+x} ]]; then
308267

268+
elif [[ -z ${args['publisher']+x} ]]; then
309269
args['publisher']=$1
310270
shift
311271
else
@@ -321,26 +281,27 @@ parse_requirements() {
321281
[[ -n ${args['source']:-} ]] || args['source']="stable"
322282
[[ -n ${args['publisher']:-} ]] || args['publisher']="inventree"
323283

324-
if [[ -n ${args['source']} ]] && [[ ! ${args['source']} =~ ^(stable|master|main)$ ]]; then
284+
if [[ -n ${args['source']:-} ]] && [[ ! ${args['source']:-} =~ ^(stable|master|main)$ ]]; then
325285
printf "%s\n" "source must be one of: stable, master, main" >&2
326286
exit 1
327287
fi
328288

329289
}
330290

331291
initialize() {
332-
version="2.0"
333-
long_usage=''
292+
declare -g version="2.0"
334293
set -e
335294

336-
337295
}
338296

339297
run() {
340-
declare -A args=()
341-
declare -A deps=()
342-
declare -a other_args=()
343-
declare -a input=()
298+
299+
declare -g long_usage=''
300+
declare -g -A args=()
301+
declare -g -A deps=()
302+
declare -g -a env_var_names=()
303+
declare -g -a input=()
304+
344305
normalize_input "$@"
345306
parse_requirements "${input[@]}"
346307

@@ -349,5 +310,6 @@ run() {
349310
esac
350311
}
351312

313+
command_line_args=("$@")
352314
initialize
353-
run "$@"
315+
run "${command_line_args[@]}"

0 commit comments

Comments
 (0)