Skip to content

Commit b25e21a

Browse files
committed
chore: bump all compiler versions to 0.4.0, add Go/Zig/Ruby to bump script
Update schema and compiler version strings across all six compilers: TS: runar-v0.4.0 / 0.4.0 Go: runar-v0.4.0 / 0.4.0-go Rust: (uses crate version from Cargo.toml) Python: runar-v0.4.0 / 0.4.0-python Zig: runar-v0.4.0 / 0.4.0-zig Ruby: runar-v0.4.0 / 0.4.0-ruby Also bump Zig package (build.zig.zon) and Ruby gem (runar.gemspec) to 0.4.0. The bump-version.sh script now handles: - Zig build.zig.zon package version - Ruby gemspec version - All compiler schema/version strings (TS, Go, Zig, Ruby, Python)
1 parent 4a1145e commit b25e21a

File tree

8 files changed

+71
-12
lines changed

8 files changed

+71
-12
lines changed

compilers/go/compiler/compiler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ type Artifact struct {
8585
}
8686

8787
const (
88-
schemaVersion = "runar-v0.1.0"
89-
compilerVersion = "0.1.0-go"
88+
schemaVersion = "runar-v0.4.0"
89+
compilerVersion = "0.4.0-go"
9090
)
9191

9292
// ---------------------------------------------------------------------------

compilers/python/runar_compiler/compiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ class Artifact:
9090
anf: ANFProgram | None = None
9191

9292

93-
SCHEMA_VERSION = "runar-v0.1.0"
94-
COMPILER_VERSION = "0.1.0-python"
93+
SCHEMA_VERSION = "runar-v0.4.0"
94+
COMPILER_VERSION = "0.4.0-python"
9595

9696

9797
# ---------------------------------------------------------------------------

compilers/ruby/lib/runar_compiler/compiler.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def initialize(
8888
end
8989
end
9090

91-
SCHEMA_VERSION = "runar-v0.1.0"
92-
COMPILER_VERSION = "0.1.0-ruby"
91+
SCHEMA_VERSION = "runar-v0.4.0"
92+
COMPILER_VERSION = "0.4.0-ruby"
9393

9494
# -------------------------------------------------------------------------
9595
# CompilationError

compilers/zig/src/codegen/emit.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,10 @@ pub fn emitArtifact(
386386
try w.writeAll("{");
387387

388388
// version
389-
try w.writeAll("\"version\":\"runar-v0.1.0\",");
389+
try w.writeAll("\"version\":\"runar-v0.4.0\",");
390390

391391
// compilerVersion
392-
try w.writeAll("\"compilerVersion\":\"runar-zig-0.2.7\",");
392+
try w.writeAll("\"compilerVersion\":\"0.4.0-zig\",");
393393

394394
// contractName
395395
try w.writeAll("\"contractName\":");

packages/runar-compiler/src/artifact/assembler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ export interface AssembleOptions {
140140
// Constants
141141
// ---------------------------------------------------------------------------
142142

143-
const ARTIFACT_VERSION = 'runar-v0.1.0';
144-
const DEFAULT_COMPILER_VERSION = '0.1.0';
143+
const ARTIFACT_VERSION = 'runar-v0.4.0';
144+
const DEFAULT_COMPILER_VERSION = '0.4.0';
145145

146146
// ---------------------------------------------------------------------------
147147
// Type serialization

packages/runar-rb/runar.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |spec|
44
spec.name = 'runar-lang'
5-
spec.version = '0.1.0'
5+
spec.version = '0.4.0'
66
spec.authors = ['Runar Contributors']
77
spec.summary = 'Ruby runtime for Runar Bitcoin Script contracts'
88
spec.description = 'Provides base classes, types, mock crypto, real hashes, and EC operations ' \

packages/runar-zig/build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = .runar_zig,
3-
.version = "0.3.2",
3+
.version = "0.4.0",
44
.fingerprint = 0xea3eee86094a0f21,
55
.dependencies = .{
66
.bsvz = .{

scripts/bump-version.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ PY_FILES=(
4040
"$ROOT/compilers/python/pyproject.toml"
4141
)
4242

43+
# Compiler version strings (schema + per-language)
44+
COMPILER_VERSION_FILES=(
45+
"$ROOT/packages/runar-compiler/src/artifact/assembler.ts"
46+
"$ROOT/compilers/go/compiler/compiler.go"
47+
"$ROOT/compilers/zig/src/codegen/emit.zig"
48+
"$ROOT/compilers/ruby/lib/runar_compiler/compiler.rb"
49+
"$ROOT/compilers/python/runar_compiler/compiler.py"
50+
)
51+
52+
# Package manifests for Zig and Ruby
53+
ZIG_ZON="$ROOT/packages/runar-zig/build.zig.zon"
54+
RUBY_GEMSPEC="$ROOT/packages/runar-rb/runar.gemspec"
55+
4356
get_current_version() {
4457
grep '"version"' "$ROOT/package.json" | head -1 | sed 's/.*"version": "\([^"]*\)".*/\1/'
4558
}
@@ -194,6 +207,52 @@ bump_version() {
194207
fi
195208
done
196209

210+
# Zig package version
211+
if [ -f "$ZIG_ZON" ]; then
212+
sed -i '' "s/\.version = \"$OLD\"/\.version = \"$NEW\"/" "$ZIG_ZON"
213+
echo " ✓ packages/runar-zig/build.zig.zon"
214+
fi
215+
216+
# Ruby gem version
217+
if [ -f "$RUBY_GEMSPEC" ]; then
218+
sed -i '' "s/spec\.version.*=.*'$OLD'/spec.version = '$NEW'/" "$RUBY_GEMSPEC"
219+
echo " ✓ packages/runar-rb/runar.gemspec"
220+
fi
221+
222+
# Compiler version strings (schema + per-language identifiers)
223+
# TS: ARTIFACT_VERSION and DEFAULT_COMPILER_VERSION
224+
sed -i '' "s/const ARTIFACT_VERSION = 'runar-v$OLD'/const ARTIFACT_VERSION = 'runar-v$NEW'/" \
225+
"$ROOT/packages/runar-compiler/src/artifact/assembler.ts"
226+
sed -i '' "s/const DEFAULT_COMPILER_VERSION = '$OLD'/const DEFAULT_COMPILER_VERSION = '$NEW'/" \
227+
"$ROOT/packages/runar-compiler/src/artifact/assembler.ts"
228+
echo " ✓ TS compiler version strings"
229+
230+
# Go
231+
sed -i '' "s/schemaVersion = \"runar-v$OLD\"/schemaVersion = \"runar-v$NEW\"/" \
232+
"$ROOT/compilers/go/compiler/compiler.go"
233+
sed -i '' "s/compilerVersion = \"$OLD-go\"/compilerVersion = \"$NEW-go\"/" \
234+
"$ROOT/compilers/go/compiler/compiler.go"
235+
echo " ✓ Go compiler version strings"
236+
237+
# Zig
238+
sed -i '' "s/runar-v$OLD/runar-v$NEW/" "$ROOT/compilers/zig/src/codegen/emit.zig"
239+
sed -i '' "s/$OLD-zig/$NEW-zig/" "$ROOT/compilers/zig/src/codegen/emit.zig"
240+
echo " ✓ Zig compiler version strings"
241+
242+
# Ruby
243+
sed -i '' "s/SCHEMA_VERSION = \"runar-v$OLD\"/SCHEMA_VERSION = \"runar-v$NEW\"/" \
244+
"$ROOT/compilers/ruby/lib/runar_compiler/compiler.rb"
245+
sed -i '' "s/COMPILER_VERSION = \"$OLD-ruby\"/COMPILER_VERSION = \"$NEW-ruby\"/" \
246+
"$ROOT/compilers/ruby/lib/runar_compiler/compiler.rb"
247+
echo " ✓ Ruby compiler version strings"
248+
249+
# Python
250+
sed -i '' "s/SCHEMA_VERSION = \"runar-v$OLD\"/SCHEMA_VERSION = \"runar-v$NEW\"/" \
251+
"$ROOT/compilers/python/runar_compiler/compiler.py"
252+
sed -i '' "s/COMPILER_VERSION = \"$OLD-python\"/COMPILER_VERSION = \"$NEW-python\"/" \
253+
"$ROOT/compilers/python/runar_compiler/compiler.py"
254+
echo " ✓ Python compiler version strings"
255+
197256
echo ""
198257
echo "Done. Verify with: git diff"
199258
echo "Or run: ./scripts/bump-version.sh --check"

0 commit comments

Comments
 (0)