Skip to content

Commit

Permalink
Added the Sworn version number to JS output.
Browse files Browse the repository at this point in the history
  • Loading branch information
artob committed Oct 15, 2020
1 parent 009a990 commit ebb8cbf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2020-10-07
## [1.0.0] - 2020-10-15

### Changed

- Generated JavaScript code now mentions the used Sworn version.
- Some improvements to the WebAssembly target.

### Added

- More documentation in the README.

## [0.4.0] - 2020-10-06

### Changed
Expand Down
2 changes: 1 addition & 1 deletion bin/sworn/sworn.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let sworn verbose paths output target _optimize =
fprintf output_formatter "@[<v>%a@]@?" SWIR.print_program program'
| JS ->
let program' = SWIR.compile_program program in
fprintf output_formatter "// Generated by Sworn on %a@\n@\n"
fprintf output_formatter "// Generated by Sworn %s on %a@\n@\n" version
ISO8601.Permissive.pp_datetimezone (Unix.time (), 0.);
fprintf output_formatter "clarity.requireVersion(\"%s\");@\n@\n" js_version;
fprintf output_formatter "@[<v>%a@]@?" JavaScript.print_program program'
Expand Down

0 comments on commit ebb8cbf

Please sign in to comment.