Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: fix incompatibilities between normal and alpine sh #649

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,9 @@ platform:
os: linux
steps:
- commands:
- apk update && apk add git
- echo "$(sh ./tools/image-tag-docker)" > .tag-only
- echo "grafana/alloy-dev:$(sh ./tools/image-tag-docker)" > .image-tag
- apk add --no-cache bash git
- echo "$(bash ./tools/image-tag-docker)" > .tag-only
- echo "grafana/alloy-dev:$(bash ./tools/image-tag-docker)" > .image-tag
image: alpine
name: Create .image-tag
- image: us.gcr.io/kubernetes-dev/drone/plugins/updater
Expand Down Expand Up @@ -713,6 +713,6 @@ kind: secret
name: updater_private_key
---
kind: signature
hmac: 478adbeda3c0ad620fbeb8eca6aa976709b6d9e71451644663a3c4362380df69
hmac: eef3ddde1e027f6c8c113bf748036cb79961708262d651193c231096cda5260d

...
6 changes: 3 additions & 3 deletions .drone/pipelines/publish.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ linux_containers_jobs + windows_containers_jobs + [
name: 'Create .image-tag',
image: 'alpine',
commands: [
'apk update && apk add git',
'echo "$(sh ./tools/image-tag-docker)" > .tag-only',
'echo "grafana/alloy-dev:$(sh ./tools/image-tag-docker)" > .image-tag',
'apk add --no-cache bash git',
'echo "$(bash ./tools/image-tag-docker)" > .tag-only',
'echo "grafana/alloy-dev:$(bash ./tools/image-tag-docker)" > .image-tag',
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion tools/image-tag
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
#
# image-tag determines which version to embed into a built image.
#
Expand Down
4 changes: 2 additions & 2 deletions tools/image-tag-docker
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
#
# image-tag-docker runs ./tools/image-tag but sanitizes invalid characters
# for use in Docker image tags.

TAG=$(sh ./tools/image-tag)
TAG=$(/usr/bin/env bash ./tools/image-tag)
echo ${TAG//+/-}
Loading