Skip to content

Commit

Permalink
switch to using tags, now project cuts tags. Attempt to fix up the bu…
Browse files Browse the repository at this point in the history
…ild with the most recent release

Signed-off-by: Mark McCormick <[email protected]>
  • Loading branch information
mamccorm committed Oct 8, 2024
1 parent 2a2edfd commit b4b5218
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 18 deletions.
50 changes: 32 additions & 18 deletions marzano.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package:
name: marzano
# This project doesn't do releases and everything is commit based.
# This corresponds to commit bf632bd68f1b7fdb201b2379c3b31bc82eee9fee
version: 0.0_git20240410
epoch: 2
version: 0.1.0_alpha.1727989739
epoch: 0
description: "a structural diff that understands syntax"
copyright:
- license: MIT

# Replace the last `.` with `-` to fetch the correct tag.
var-transforms:
- from: ${{package.version}}
match: '_'
replace: "-"
to: mangled-package-version

environment:
contents:
packages:
Expand All @@ -20,29 +25,38 @@ environment:
- perl
- rust

vars:
commit: bf632bd68f1b7fdb201b2379c3b31bc82eee9fee

pipeline:
- runs: |
# Hack until they cut a release
git clone https://github.com/getgrit/gritql
cd gritql
git checkout ${{vars.commit}}
git submodule update --init
- uses: git-checkout
with:
repository: https://github.com/getgrit/gritql
tag: v${{vars.mangled-package-version}}
expected-commit: 1146594a2c0d0286bf3b105c2414e046251e6e01
recurse-submodules: true

- uses: rust/cargobump
# Fixes incorrect?? feature references in various Cargo.toml files.
# The "dep:" syntax used for optional dependencies in feature definitions does not create
# implicit features. By removing "dep:" from these entries, we correctly reference the optional
# dependencies and enable the necessary features for building the project.
- uses: patch
with:
patches: fix-core-dependency.patch fix-cli-dependency.patch fix-lsp-dependency.patch

- runs: |
cd gritql
cargo auditable build --release
cargo auditable build --release --features "tracing-opentelemetry"
install -Dm755 target/release/marzano "${{targets.destdir}}"/usr/bin/marzano
- uses: strip

update:
enabled: false
exclude-reason: Until this project does releases we'll have to update these manually
enabled: true
github:
identifier: getgrit/gritql
strip-prefix: v
use-tag: true
# Takes '0.1.0-alpha.1727989739' and converts into '0.1.0_alpha.1727989739'.
version-transform:
- match: ^(\d+\.\d+\.\d+)\-(.+)$
replace: $1_$2

test:
pipeline:
Expand Down
13 changes: 13 additions & 0 deletions marzano/fix-cli-dependency.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml
index 78cbae47..327722d4 100644
--- a/crates/cli/Cargo.toml
+++ b/crates/cli/Cargo.toml
@@ -131,7 +131,7 @@ grit_tracing = [
"dep:opentelemetry-otlp",
"dep:opentelemetry",
"dep:opentelemetry_sdk",
- "dep:tracing-opentelemetry",
+ "tracing-opentelemetry",
"dep:tracing-subscriber",
"dep:tracing-log",
"marzano-core/grit_tracing",
13 changes: 13 additions & 0 deletions marzano/fix-core-dependency.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml
index 96999925..53cb902e 100644
--- a/crates/core/Cargo.toml
+++ b/crates/core/Cargo.toml
@@ -94,7 +94,7 @@ wasm_core = [
"marzano-util/external_functions_ffi",
"dep:wasm-bindgen",
]
-grit_tracing = ["dep:tracing-opentelemetry"]
+grit_tracing = ["tracing-opentelemetry"]
language-parsers = ["marzano-language/builtin-parser"]
grit-parser = ["marzano-language/grit-parser"]
absolute_filename = []
10 changes: 10 additions & 0 deletions marzano/fix-lsp-dependency.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/crates/lsp/Cargo.toml b/crates/lsp/Cargo.toml
index ce714b11..88b0af35 100644
--- a/crates/lsp/Cargo.toml
+++ b/crates/lsp/Cargo.toml
@@ -45,4 +45,4 @@ project_diagnostics = ["caching"]
grit_alpha = []
# Run these features in testing
test_ci = []
-grit_tracing = ["dep:tracing-opentelemetry"]
+grit_tracing = ["tracing-opentelemetry"]

0 comments on commit b4b5218

Please sign in to comment.