<commit_before>package plugins

import (
	"github.com/InnovaCo/serve/manifest"
	"github.com/InnovaCo/serve/utils"
)

func init() {
	manifest.PluginRegestry.Add("build.sbt-pack", SbtPackBuild{})
}

type SbtPackBuild struct{}

func (p SbtPackBuild) Run(data manifest.Manifest) error {
	return utils.RunCmd(`sbt ';set version := "%s"' clean test pack`, data.GetString("version"))
}
<commit_msg>= sbt-pack: support publish<commit_after>package plugins

import (
	"github.com/InnovaCo/serve/manifest"
	"github.com/InnovaCo/serve/utils"
)

func init() {
	manifest.PluginRegestry.Add("build.sbt-pack", SbtPackBuild{})
}

type SbtPackBuild struct{}

func (p SbtPackBuild) Run(data manifest.Manifest) error {
	publish := ""
	if data.GetBool("publish") {
		publish = "publish"
	}

  return utils.RunCmd(`sbt ';set version := "%s"' clean test %s pack`, data.GetString("version"), publish)
}

{'fraction_non_alphanumeric': 0.15795454545454546, 'fraction_numerical': 0.0, 'mean_word_length': 5.338129496402877, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7454933', 'n_tokens_mistral': 321, 'n_tokens_neox': 316, 'n_words': 64}