Skip to content

Commit

Permalink
Fix installation documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
austek committed May 31, 2023
1 parent 0d81892 commit 2897a48
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
20 changes: 17 additions & 3 deletions docs/modules/ROOT/pages/getting_started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,34 @@ INFORMATION:: The default plugin directory (`$HOME/.pact/plugins`) can be change
mkdir -p ~/.pact/plugins/avro-{version}
----

. Download the plugin manifest into the directory:
+
[source,shell,subs=attributes]
----
wget https://github.com/austek/pact-avro-plugin/releases/download/v-{version}/pact-plugin.json -O ~/.pact/plugins/avro-{version}/pact-plugin.json
----

. Download the plugin executable into the directory:
+
[source,shell,subs=attributes]
----
wget -c https://github.com/austek/pact-avro-plugin/releases/download/v{version}/pact-avro-plugin-{version}.tgz -O ~/.pact/plugins/avro-{version}/pact-avro-plugin.tgz
wget -c https://github.com/austek/pact-avro-plugin/releases/download/v{version}/pact-avro-plugin.zip -O ~/.pact/plugins/avro-{version}/pact-avro-plugin.zip
----

. Unpack the plugin executable:
+
[source,shell,subs=attributes]
----
tar -C ~/.pact/plugins/avro-${VERSION} -xzvf ~/.pact/plugins/avro-{version}/pact-avro-plugin.tgz --strip-components 1
cd ~/.pact/plugins/avro-${VERSION} && unzip pact-avro-plugin.zip
----

. Make the plugin executable:
+
[source,shell,subs=attributes]
----
chmod +x ~/.pact/plugins/avro-{version}/bin/pact-avro-plugin
----

NOTE:: The unpacked executable name must match the `entryPoint` value in the manifest file. By default, this is
`pact-avro-plugin`.
`pact-avro-plugin` on unix* and `pact-avro-plugin.bat` on Windows.

13 changes: 1 addition & 12 deletions project/PublishSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,9 @@ object PublishSettings {
"-Dlogback.configurationFile=conf/logback.xml"
),
Universal / packageName := s"pact-avro-plugin",
Universal / topLevelDirectory := Some(s"avro-${version.value}")
Universal / topLevelDirectory := None
)

// lazy val installationFilesSettings: Seq[Def.Setting[?]] =
// Seq(
// Compile / resourceGenerators += Def.task {
// val artifactDir: File = (root / target).value / "artifacts"
// Seq(
// generatePactPluginJson(artifactDir, version.value),
// generateInstallPluginSh(artifactDir, version.value)
// )
// }
// )

private def generatePactPluginJson(artifactDir: sbt.File, version: String): sbt.File = {
val file = artifactDir / "pact-plugin.json"
IO.write(file, PactPluginJson.json(version))
Expand Down

0 comments on commit 2897a48

Please sign in to comment.