Repository: conda-forge/staged-recipes
Pull request #29591: add temporal cli (temporalio-cli)
Author: login: wolfv
Created: 2025-04-01T13:57:43Z | Merged: 2025-04-04T07:48:58Z

<!--
Thank you very much for putting in this recipe PR!

This repository is very active, so if you need help with a PR, please let the
right people know. There are language-specific teams for reviewing recipes.

| Language        | Name of review team           |
| --------------- | ----------------------------- |
| python          | `@conda-forge/help-python`    |
| python/c hybrid | `@conda-forge/help-python-c`  |
| r               | `@conda-forge/help-r`         |
| java            | `@conda-forge/help-java`      |
| nodejs          | `@conda-forge/help-nodejs`    |
| c/c++           | `@conda-forge/help-c-cpp`     |
| perl            | `@conda-forge/help-perl`      |
| Julia           | `@conda-forge/help-julia`     |
| ruby            | `@conda-forge/help-ruby`      |
| Rust            | `@conda-forge/help-rust`      |
| Go              | `@conda-forge/help-go`        |
| other           | `@conda-forge/staged-recipes` |

Once the PR is ready for review, please mention one of the teams above in a
new comment. i.e. `@conda-forge/help-some-language, ready for review!`
Then, a bot will label the PR as 'review-requested'.

Due to GitHub limitations, first time contributors to conda-forge are unable
to ping conda-forge teams directly, but you can [ask a bot to ping the team][1]
using a special command in a comment on the PR to get the attention of the
`staged-recipes` team. You can also consider asking on our [Zulip chat][2]
if your recipe isn't reviewed promptly.

[1]: https://conda-forge.org/docs/maintainer/infrastructure.html#conda-forge-admin-please-ping-team
[2]: https://conda-forge.zulipchat.com

All apologies in advance if your recipe PR does not receive prompt attention.
This is a high volume repository and the reviewers are volunteers. Review times
vary depending on the number of reviewers on a given language team and may be days
or weeks. We are always looking for more staged-recipe reviewers. If you are
interested in volunteering, please contact a member of @conda-forge/core.
We'd love to have the help!
-->

Checklist
- [ ] Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
- [ ] License file is packaged (see [here](https://github.com/conda-forge/staged-recipes/blob/5eddbd7fc9d1502169089da06c3688d9759be978/recipes/example/meta.yaml#L64-L73) for an example).
- [ ] Source is from official source.
- [ ] Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
- [ ] If static libraries are linked in, the license of the static library is packaged.
- [ ] Package does not ship static libraries. If static libraries are needed, [follow CFEP-18](https://github.com/conda-forge/cfep/blob/main/cfep-18.md).
- [ ] Build number is 0.
- [ ] A tarball (`url`) rather than a repo (e.g. `git_url`) is used in your recipe (see [here](https://conda-forge.org/docs/maintainer/adding_pkgs.html#build-from-tarballs-not-repos) for more details).
- [ ] GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
- [ ] When in trouble, please check our [knowledge base documentation](https://conda-forge.org/docs/maintainer/knowledge_base.html) before pinging a team.



Diff:
diff --git a/recipes/temporalio-cli/go-statsd-license.txt b/recipes/temporalio-cli/go-statsd-license.txt
new file mode 100644
index 0000000000000..56bee4f270add
--- /dev/null
+++ b/recipes/temporalio-cli/go-statsd-license.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2016 Eli Janssen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/recipes/temporalio-cli/mathutil-license.txt b/recipes/temporalio-cli/mathutil-license.txt
new file mode 100644
index 0000000000000..128a1b64a48e5
--- /dev/null
+++ b/recipes/temporalio-cli/mathutil-license.txt
@@ -0,0 +1,27 @@
+Copyright (c) 2014 The mathutil Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+   * Neither the names of the authors nor the names of the
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/recipes/temporalio-cli/recipe.yaml b/recipes/temporalio-cli/recipe.yaml
new file mode 100644
index 0000000000000..8894b5d491449
--- /dev/null
+++ b/recipes/temporalio-cli/recipe.yaml
@@ -0,0 +1,58 @@
+context:
+  version: "1.3.0"
+
+package:
+  name: temporalio-cli
+  version: ${{ version }}
+
+source:
+  url: https://github.com/temporalio/cli/archive/refs/tags/v${{ version }}.tar.gz
+  sha256: 15be9f155cd5114367942568f884969f7ed2d3262ad39bb665cf359735f643b3
+  target_directory: src
+
+build:
+  number: 0
+  script:
+    - cd src
+    - go-licenses save ./cmd/temporal --save_path ../library_licenses --ignore github.com/cactus/go-statsd-client/statsd --ignore modernc.org/mathutil
+    - if: win
+      then: go build -ldflags="-s -w -X github.com/temporalio/cli/temporalcli.Version=${{ version }}" -v -o %LIBRARY_BIN%\temporal.exe ./cmd/temporal
+      else: go build -ldflags="-s -w -X github.com/temporalio/cli/temporalcli.Version=${{ version }}" -v -o $PREFIX/bin/temporal ./cmd/temporal
+    - if: unix
+      then:
+        - mkdir -p $PREFIX/share/bash-completion/completions
+        - temporal completion bash > $PREFIX/share/bash-completion/completions/temporal
+        - mkdir -p $PREFIX/share/zsh/site-functions
+        - temporal completion zsh > $PREFIX/share/zsh/site-functions/_temporal
+        - mkdir -p $PREFIX/share/fish/vendor_completions.d
+        - temporal completion fish > $PREFIX/share/fish/vendor_completions.d/temporal.fish
+
+requirements:
+  build:
+    - ${{ stdlib("c") }}
+    - ${{ compiler('go-nocgo') }}
+    - go-licenses
+
+tests:
+  - script:
+      - temporal --version
+
+about:
+  homepage: https://temporal.io/
+  license: MIT
+  license_file:
+    - LICENSE
+    - library_licenses/
+    # these two are not properly collected by go-licenses
+    - go-statsd-client.txt
+    - mathutil-license.txt
+
+  summary: Command-line interface for running and interacting with Temporal Server and UI
+  description: |
+    Temporal CLI is a command-line interface for running and interacting with Temporal Server and UI.
+  repository: https://github.com/temporalio/cli
+  documentation: https://docs.temporal.io/cli
+
+extra:
+  recipe-maintainers:
+    - wolfv


Reviews:
user: login: pavelzw
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-02T07:47:26Z
user: login: pavelzw
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-02T07:58:27Z
user: login: wolfv
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-04T06:14:18Z
user: login: wolfv
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-04T06:16:02Z
user: login: pavelzw
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-04T07:26:42Z

Review comments:
diff_hunk: @@ -0,0 +1,54 @@
+context:
+  version: "1.3.0"
+
+package:
+  name: temporalio-cli
+  version: ${{ version }}
+
+source:
+  url: https://github.com/temporalio/cli/archive/refs/tags/v${{ version }}.tar.gz
+  sha256: 15be9f155cd5114367942568f884969f7ed2d3262ad39bb665cf359735f643b3
+  target_directory: src
+
+build:
+  number: 0
+  script:
+    - cd src
+    - go-licenses save ./cmd/temporal --save_path ../library_licenses --ignore github.com/cactus/go-statsd-client/statsd --ignore modernc.org/mathutil
path: recipes/temporalio-cli/recipe.yaml
user: login: pavelzw
body: could you manually add the missing license files into the feedstock (or add them as an additional source)?
created_at: 2025-04-02T07:47:26Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,54 @@
+context:
+  version: "1.3.0"
+
+package:
+  name: temporalio-cli
+  version: ${{ version }}
+
+source:
+  url: https://github.com/temporalio/cli/archive/refs/tags/v${{ version }}.tar.gz
+  sha256: 15be9f155cd5114367942568f884969f7ed2d3262ad39bb665cf359735f643b3
+  target_directory: src
+
+build:
+  number: 0
+  script:
+    - cd src
+    - go-licenses save ./cmd/temporal --save_path ../library_licenses --ignore github.com/cactus/go-statsd-client/statsd --ignore modernc.org/mathutil
+    - if: win
+      then: go build -ldflags="-s -w -X github.com/temporalio/cli/temporalcli.Version=${{ version }}" -v -o %LIBRARY_BIN%\temporal.exe ./cmd/temporal
+      else: go build -ldflags="-s -w -X github.com/temporalio/cli/temporalcli.Version=${{ version }}" -v -o $PREFIX/bin/temporal ./cmd/temporal
+    - if: unix
+      then:
+        - mkdir -p $PREFIX/share/bash-completion/completions
+        - temporal completion bash > $PREFIX/share/bash-completion/completions/temporal
+        - mkdir -p $PREFIX/share/zsh/site-functions
+        - temporal completion zsh > $PREFIX/share/zsh/site-functions/_temporal
+        - mkdir -p $PREFIX/share/fish/vendor_completions.d
+        - temporal completion fish > $PREFIX/share/fish/vendor_completions.d/temporal.fish
path: recipes/temporalio-cli/recipe.yaml
user: login: pavelzw
body: how will this work when cross-compiling from osx-64 to osx-arm64?
created_at: 2025-04-02T07:58:27Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,54 @@
+context:
+  version: "1.3.0"
+
+package:
+  name: temporalio-cli
+  version: ${{ version }}
+
+source:
+  url: https://github.com/temporalio/cli/archive/refs/tags/v${{ version }}.tar.gz
+  sha256: 15be9f155cd5114367942568f884969f7ed2d3262ad39bb665cf359735f643b3
+  target_directory: src
+
+build:
+  number: 0
+  script:
+    - cd src
+    - go-licenses save ./cmd/temporal --save_path ../library_licenses --ignore github.com/cactus/go-statsd-client/statsd --ignore modernc.org/mathutil
path: recipes/temporalio-cli/recipe.yaml
user: login: wolfv
body: Done! 
created_at: 2025-04-04T06:14:18Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,54 @@
+context:
+  version: "1.3.0"
+
+package:
+  name: temporalio-cli
+  version: ${{ version }}
+
+source:
+  url: https://github.com/temporalio/cli/archive/refs/tags/v${{ version }}.tar.gz
+  sha256: 15be9f155cd5114367942568f884969f7ed2d3262ad39bb665cf359735f643b3
+  target_directory: src
+
+build:
+  number: 0
+  script:
+    - cd src
+    - go-licenses save ./cmd/temporal --save_path ../library_licenses --ignore github.com/cactus/go-statsd-client/statsd --ignore modernc.org/mathutil
+    - if: win
+      then: go build -ldflags="-s -w -X github.com/temporalio/cli/temporalcli.Version=${{ version }}" -v -o %LIBRARY_BIN%\temporal.exe ./cmd/temporal
+      else: go build -ldflags="-s -w -X github.com/temporalio/cli/temporalcli.Version=${{ version }}" -v -o $PREFIX/bin/temporal ./cmd/temporal
+    - if: unix
+      then:
+        - mkdir -p $PREFIX/share/bash-completion/completions
+        - temporal completion bash > $PREFIX/share/bash-completion/completions/temporal
+        - mkdir -p $PREFIX/share/zsh/site-functions
+        - temporal completion zsh > $PREFIX/share/zsh/site-functions/_temporal
+        - mkdir -p $PREFIX/share/fish/vendor_completions.d
+        - temporal completion fish > $PREFIX/share/fish/vendor_completions.d/temporal.fish
path: recipes/temporalio-cli/recipe.yaml
user: login: wolfv
body: That is a good question. It won't work well, if we are not also building a `osx-64` binary at the same time (only to generate the completions).

The other idea would be to create a `noarch` package that only contains the completions, and skip that when cross compiling but that might also not be the ideal solution.
created_at: 2025-04-04T06:16:02Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,54 @@
+context:
+  version: "1.3.0"
+
+package:
+  name: temporalio-cli
+  version: ${{ version }}
+
+source:
+  url: https://github.com/temporalio/cli/archive/refs/tags/v${{ version }}.tar.gz
+  sha256: 15be9f155cd5114367942568f884969f7ed2d3262ad39bb665cf359735f643b3
+  target_directory: src
+
+build:
+  number: 0
+  script:
+    - cd src
+    - go-licenses save ./cmd/temporal --save_path ../library_licenses --ignore github.com/cactus/go-statsd-client/statsd --ignore modernc.org/mathutil
+    - if: win
+      then: go build -ldflags="-s -w -X github.com/temporalio/cli/temporalcli.Version=${{ version }}" -v -o %LIBRARY_BIN%\temporal.exe ./cmd/temporal
+      else: go build -ldflags="-s -w -X github.com/temporalio/cli/temporalcli.Version=${{ version }}" -v -o $PREFIX/bin/temporal ./cmd/temporal
+    - if: unix
+      then:
+        - mkdir -p $PREFIX/share/bash-completion/completions
+        - temporal completion bash > $PREFIX/share/bash-completion/completions/temporal
+        - mkdir -p $PREFIX/share/zsh/site-functions
+        - temporal completion zsh > $PREFIX/share/zsh/site-functions/_temporal
+        - mkdir -p $PREFIX/share/fish/vendor_completions.d
+        - temporal completion fish > $PREFIX/share/fish/vendor_completions.d/temporal.fish
path: recipes/temporalio-cli/recipe.yaml
user: login: pavelzw
body: As discussed, we’ll do native builds for this one so it should be fine 
created_at: 2025-04-04T07:26:37Z
author_association: MEMBER

PR comments:
user: login: github-actions[bot]
created_at: 2025-04-01T13:59:02Z
body: Hi! This is the staged-recipes linter and your PR looks excellent! :rocket:


author_association: CONTRIBUTOR
user: login: conda-forge-admin
created_at: 2025-04-01T13:59:28Z
body: Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (```recipes/temporal-cli/recipe.yaml```) and found some lint.

Here's what I've got...


For **recipes/temporal-cli/recipe.yaml**:

 * ❌ There are too few lines.  There should be one empty line at the end of the file.


<sub>This message was generated by GitHub Actions workflow run [https://github.com/conda-forge/conda-forge-webservices/actions/runs/14198051864](https://github.com/conda-forge/conda-forge-webservices/actions/runs/14198051864). Examine the logs at this URL for more detail.</sub>

author_association: CONTRIBUTOR
user: login: conda-forge-admin
created_at: 2025-04-01T15:20:03Z
body: Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (```recipes/temporalio-cli/recipe.yaml```) and found it was in an excellent condition.

author_association: CONTRIBUTOR