Skip to content

Commit

Permalink
feat: add version to polyform (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalebpace authored Feb 5, 2025
1 parent af38152 commit d9a05fc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
};

outputs =
{ nixpkgs, utils, ... }:
{
self,
nixpkgs,
utils,
...
}:
utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
rev = if builtins.hasAttr "shortRev" self then self.shortRev else self.dirtyShortRev;

# Anytime dependencies update or change, we will need to update this.
# This ensures a package is reproducible.
Expand Down Expand Up @@ -73,7 +79,7 @@
cp -r ${polyform.goModules} ./vendor
GOOS=js GOARCH=wasm go build -mod=vendor -o ./main.wasm ./cmd/polyform
${polywasm}/bin/polywasm build --wasm ./main.wasm -o $DIST
${polywasm}/bin/polywasm build --version ${rev} --wasm ./main.wasm -o $DIST
cp -r $DIST/* $out
'';
Expand Down

0 comments on commit d9a05fc

Please sign in to comment.