line_items 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ target/**
2
+ pkg/**
3
+ dist/**
@@ -0,0 +1,83 @@
1
+ stages:
2
+ - quality
3
+ - test
4
+ - build
5
+ - publish
6
+
7
+ lint:
8
+ stage: quality
9
+ image: rust:alpine
10
+ variables:
11
+ RUSTFLAGS: "-Dwarnings"
12
+ script:
13
+ - rustup component add clippy
14
+ - cargo clippy
15
+
16
+ formatting:
17
+ stage: quality
18
+ image: rust:alpine
19
+ script:
20
+ - rustup component add rustfmt
21
+ - cargo fmt --check
22
+
23
+ build python package:
24
+ stage: build
25
+ image: rust:alpine
26
+ script:
27
+ - apk add curl
28
+ # TODO: Replace this with an apk add once uv is at a higher version
29
+ - curl -LsSf https://astral.sh/uv/install.sh | sh
30
+ - export PATH=$PATH:$HOME/.local/bin
31
+ - uv build
32
+ artifacts:
33
+ paths:
34
+ # Should only ever be one file, but will change filename depending on the version.
35
+ - target/wheels/line_items*.tar.gz
36
+
37
+ build js package:
38
+ stage: build
39
+ image: rust:alpine
40
+ script:
41
+ - apk add npm
42
+ - npm install -g wasm-pack
43
+ - wasm-pack build . --features=wasm
44
+ artifacts:
45
+ paths:
46
+ # Should only ever be one file, but will change filename depending on the version.
47
+ - pkg/line_items*.tar.gz
48
+
49
+ publish python package:
50
+ stage: publish
51
+ image: rust:alpine
52
+ script:
53
+ - apk add curl
54
+ # TODO: Replace this with an apk add once uv is at a higher version
55
+ - curl -LsSf https://astral.sh/uv/install.sh | sh
56
+ - export PATH=$PATH:$HOME/.local/bin
57
+ - uv publish
58
+ artifacts:
59
+
60
+ # rules:
61
+ # - if: $CI_COMMIT_TAG
62
+ # when: never
63
+ # - if: $CI_COMMIT_BRANCH == 'main'
64
+
65
+ publish js package:
66
+ stage: publish
67
+ image: rust:alpine
68
+ script:
69
+ - apk add npm jq
70
+ - npm install -g wasm-pack
71
+ - wasm-pack build . --features=wasm
72
+ - jq 'setpath(["name"]; "@artconomy/line_items")' pkg/package.json > pkg/package.json.new
73
+ - mv pkg/package.json.new pkg/package.json
74
+ - wasm-pack pack
75
+ - wasm-pack publish --access=public
76
+ artifacts:
77
+ paths:
78
+ # Should only ever be one file, but will change filename depending on the version.
79
+ - pkg/line_items*.tar.gz
80
+ # rules:
81
+ # - if: $CI_COMMIT_TAG
82
+ # when: never
83
+ # - if: $CI_COMMIT_BRANCH == 'main'