Compare commits
9 Commits
pierremtb/
...
fix-editor
Author | SHA1 | Date | |
---|---|---|---|
4c185c3cab | |||
c208227de0 | |||
42ad854aee | |||
40479d177f | |||
b88359dee2 | |||
f4c0347104 | |||
ad36b5f5fa | |||
b798cf19d3 | |||
7cfa897561 |
29
.github/workflows/announce_release.yml
vendored
29
.github/workflows/announce_release.yml
vendored
@ -1,29 +0,0 @@
|
||||
name: Announce Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
announce_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install requests
|
||||
|
||||
- name: Announce Release
|
||||
env:
|
||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
RELEASE_VERSION: ${{ github.event.release.tag_name }}
|
||||
RELEASE_BODY: ${{ github.event.release.body}}
|
||||
run: python public/announce_release.py
|
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@ -370,3 +370,27 @@ jobs:
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: 'artifact/*/Zoo*'
|
||||
|
||||
announce_release:
|
||||
needs: [publish-apps-release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install requests
|
||||
|
||||
- name: Announce Release
|
||||
env:
|
||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
RELEASE_VERSION: ${{ github.event.release.tag_name }}
|
||||
RELEASE_BODY: ${{ github.event.release.body}}
|
||||
run: python public/announce_release.py
|
@ -136,6 +136,11 @@ Before you submit a contribution PR to this repo, please ensure that:
|
||||
VERSION=x.y.z yarn run bump-jsons
|
||||
```
|
||||
|
||||
Alternatively you can try the experimental `make-release.sh` bash script that will create the branch with the updated json files for you.
|
||||
run `./make-release.sh` for a patch update
|
||||
run `./make-release.sh "minor"` for minor
|
||||
run `./make-release.sh "major"` for major
|
||||
|
||||
The PR may serve as a place to discuss the human-readable changelog and extra QA. A quick way of getting PR's merged since the last bump is to [use this PR filter](https://github.com/KittyCAD/modeling-app/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+), open up the browser console and past in the following
|
||||
|
||||
```typescript
|
||||
|
69
make-release.sh
Executable file
69
make-release.sh
Executable file
@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! git diff-index --quiet HEAD --; then
|
||||
echo "Please stash uncommitted changes before running release script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git checkout main
|
||||
git pull
|
||||
git fetch --all
|
||||
|
||||
# Get the latest semver tag from git
|
||||
latest_tag=$(jq -r '.version' package.json)
|
||||
latest_tag="v$latest_tag"
|
||||
|
||||
# Print the latest semver tag
|
||||
echo "Latest semver tag: $latest_tag"
|
||||
|
||||
# Function to bump version numbers
|
||||
bump_version() {
|
||||
local version=$1
|
||||
local bump_type=$2
|
||||
local major=$(echo $version | cut -d '.' -f 1 | sed 's/v//')
|
||||
local minor=$(echo $version | cut -d '.' -f 2)
|
||||
local patch=$(echo $version | cut -d '.' -f 3)
|
||||
|
||||
case "$bump_type" in
|
||||
major)
|
||||
major=$((major + 1))
|
||||
minor=0
|
||||
patch=0
|
||||
;;
|
||||
minor)
|
||||
minor=$((minor + 1))
|
||||
patch=0
|
||||
;;
|
||||
*)
|
||||
patch=$((patch + 1))
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "v${major}.${minor}.${patch}"
|
||||
}
|
||||
|
||||
# Determine the type of bump based on the argument
|
||||
bump_type=${1:-patch}
|
||||
|
||||
# Bump the version
|
||||
new_version=$(bump_version $latest_tag $bump_type)
|
||||
|
||||
# Print the new semver tag
|
||||
echo "New semver tag: $new_version"
|
||||
new_version_number=${new_version:1}
|
||||
echo "New version number without 'v': $new_version_number"
|
||||
|
||||
|
||||
git checkout -b "cut-release-$new_version"
|
||||
|
||||
echo "$(jq --arg v "$new_version_number" '.version=$v' package.json --indent 2)" > package.json
|
||||
echo "$(jq --arg v "$new_version_number" '.package.version=$v' src-tauri/tauri.conf.json --indent 2)" > src-tauri/tauri.conf.json
|
||||
|
||||
git add package.json src-tauri/tauri.conf.json
|
||||
git commit -m "Cut release $new_version"
|
||||
|
||||
echo ""
|
||||
echo "Versions has been bumped in relevant json files, a branch has been created and committed to."
|
||||
echo ""
|
||||
echo "What's left for you to do is, push the branch and make the release PR."
|
||||
echo ""
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "untitled-app",
|
||||
"version": "0.15.1",
|
||||
"version": "0.15.2",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.10.2",
|
||||
|
@ -7,7 +7,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "zoo-modeling-app",
|
||||
"version": "0.15.1"
|
||||
"version": "0.15.2"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
@ -140,7 +140,7 @@ export function App() {
|
||||
<Resizable
|
||||
className={
|
||||
'pointer-events-none h-full flex flex-col flex-1 z-10 my-5 ml-5 pr-1 transition-opacity transition-duration-75 ' +
|
||||
+paneOpacity
|
||||
paneOpacity
|
||||
}
|
||||
defaultSize={{
|
||||
width: '550px',
|
||||
|
@ -39,7 +39,22 @@
|
||||
}
|
||||
|
||||
.panel[open] {
|
||||
@apply flex-grow max-h-full h-48 my-1 rounded;
|
||||
@apply relative flex-grow max-h-full h-48 my-1 rounded;
|
||||
}
|
||||
|
||||
/*
|
||||
Open panels have a little bit of a buffer around them
|
||||
to make it harder to accidentally click or interact with the stream behind them.
|
||||
The right side buffer is a little smaller so people don't get frustrated by it.
|
||||
TODO: make this logic flexible for if the panel is on the right side of the screen.
|
||||
*/
|
||||
.panel[open]::before {
|
||||
@apply absolute -inset-5 -top-2 -right-1 z-0;
|
||||
@apply content-[''];
|
||||
}
|
||||
|
||||
.panel[open]:first-of-type::before {
|
||||
@apply -top-5;
|
||||
}
|
||||
|
||||
.panel[open] + .panel[open],
|
||||
|
10
src/wasm-lib/Cargo.lock
generated
10
src/wasm-lib/Cargo.lock
generated
@ -1893,7 +1893,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-lib"
|
||||
version = "0.1.41"
|
||||
version = "0.1.42"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"approx 0.5.1",
|
||||
@ -1986,7 +1986,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "kittycad-execution-plan"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/KittyCAD/modeling-api?branch=main#632b75a0242400fa34373d7973b9149b0e08aa3f"
|
||||
source = "git+https://github.com/KittyCAD/modeling-api?branch=main#08f05d91062380fe3a69f4baa1f1301532d31977"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"insta",
|
||||
@ -2036,8 +2036,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kittycad-modeling-cmds"
|
||||
version = "0.1.17"
|
||||
source = "git+https://github.com/KittyCAD/modeling-api?branch=main#632b75a0242400fa34373d7973b9149b0e08aa3f"
|
||||
version = "0.1.18"
|
||||
source = "git+https://github.com/KittyCAD/modeling-api?branch=main#08f05d91062380fe3a69f4baa1f1301532d31977"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@ -2064,7 +2064,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "kittycad-modeling-session"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/KittyCAD/modeling-api?branch=main#632b75a0242400fa34373d7973b9149b0e08aa3f"
|
||||
source = "git+https://github.com/KittyCAD/modeling-api?branch=main#08f05d91062380fe3a69f4baa1f1301532d31977"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"kittycad",
|
||||
|
@ -202,12 +202,8 @@ impl Planner {
|
||||
ast::types::BinaryOperator::Sub => ep::BinaryOperation::Sub,
|
||||
ast::types::BinaryOperator::Mul => ep::BinaryOperation::Mul,
|
||||
ast::types::BinaryOperator::Div => ep::BinaryOperation::Div,
|
||||
ast::types::BinaryOperator::Mod => {
|
||||
todo!("execution plan instruction set doesn't support Mod yet")
|
||||
}
|
||||
ast::types::BinaryOperator::Pow => {
|
||||
todo!("execution plan instruction set doesn't support Pow yet")
|
||||
}
|
||||
ast::types::BinaryOperator::Mod => ep::BinaryOperation::Mod,
|
||||
ast::types::BinaryOperator::Pow => ep::BinaryOperation::Pow,
|
||||
},
|
||||
operand0: ep::Operand::Reference(l_binding),
|
||||
operand1: ep::Operand::Reference(r_binding),
|
||||
|
@ -1145,3 +1145,54 @@ fn arrays_as_parameters() {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mod_and_pow() {
|
||||
let program = "
|
||||
let x = 2
|
||||
let y = x^3
|
||||
let z = y % 5
|
||||
";
|
||||
let (plan, _bindings) = must_plan(program);
|
||||
let addr0 = Address::ZERO;
|
||||
let addr1 = Address::ZERO.offset(1);
|
||||
let addr2 = Address::ZERO.offset(2);
|
||||
let addr3 = Address::ZERO.offset(3);
|
||||
let addr4 = Address::ZERO.offset(4);
|
||||
print!("{:?}", plan);
|
||||
assert_eq!(
|
||||
plan,
|
||||
vec![
|
||||
Instruction::SetPrimitive {
|
||||
address: addr0,
|
||||
value: 2i64.into(),
|
||||
},
|
||||
Instruction::SetPrimitive {
|
||||
address: addr1,
|
||||
value: 3i64.into(),
|
||||
},
|
||||
// x ^ 3, where x = 2
|
||||
Instruction::BinaryArithmetic {
|
||||
arithmetic: ep::BinaryArithmetic {
|
||||
operation: ep::BinaryOperation::Pow,
|
||||
operand0: ep::Operand::Reference(addr0),
|
||||
operand1: ep::Operand::Reference(addr1),
|
||||
},
|
||||
destination: Destination::Address(addr2),
|
||||
},
|
||||
Instruction::SetPrimitive {
|
||||
address: addr3,
|
||||
value: 5i64.into(),
|
||||
},
|
||||
// y % 5, where y is 2^3
|
||||
Instruction::BinaryArithmetic {
|
||||
arithmetic: ep::BinaryArithmetic {
|
||||
operation: ep::BinaryOperation::Mod,
|
||||
operand0: ep::Operand::Reference(addr2),
|
||||
operand1: ep::Operand::Reference(addr3),
|
||||
},
|
||||
destination: Destination::Address(addr4),
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-lib"
|
||||
description = "KittyCAD Language implementation and tools"
|
||||
version = "0.1.41"
|
||||
version = "0.1.42"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -267,6 +267,7 @@ fn binary_operator(i: TokenSlice) -> PResult<BinaryOperator> {
|
||||
"/" => BinaryOperator::Div,
|
||||
"*" => BinaryOperator::Mul,
|
||||
"%" => BinaryOperator::Mod,
|
||||
"^" => BinaryOperator::Pow,
|
||||
_ => {
|
||||
return Err(KclError::Syntax(KclErrorDetails {
|
||||
source_ranges: token.as_source_ranges(),
|
||||
|
12
yarn.lock
12
yarn.lock
@ -5624,14 +5624,14 @@ internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5:
|
||||
side-channel "^1.0.4"
|
||||
|
||||
ip@^1.1.8:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
|
||||
integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==
|
||||
version "1.1.9"
|
||||
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396"
|
||||
integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==
|
||||
|
||||
ip@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||
|
||||
is-arguments@^1.0.4, is-arguments@^1.1.1:
|
||||
version "1.1.1"
|
||||
|
Reference in New Issue
Block a user