Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
(MAINT) Add WORKINGDIR env var
Browse files Browse the repository at this point in the history
  • Loading branch information
sanfrancrisko committed May 27, 2021
1 parent fcb916e commit f8d30f4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ env:
jobs:
goreleaser:
runs-on: ubuntu-latest
env:
WORKINGDIR: ${{ github.workspace }}
steps:
-
name: Checkout pdkgo
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ builds:
- arm
- arm64
asmflags:
- all=-trimpath={{.Env.GOPATH}}
- all=-trimpath={{.Env.WORKINGDIR}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}
- all=-trimpath={{.Env.WORKINGDIR}}
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.CommitDate}}
mod_timestamp: '{{ .CommitTimestamp }}'
Expand Down
2 changes: 2 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ param (
[string]
$Target = 'build'
)
$Env:WORKINGDIR = $PSScriptRoot

switch ($Target) {
'build' {
$arch = go env GOHOSTARCH
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

export WORKINGDIR=$(pwd)

target=${1:-build}
if [ "$target" == "build" ]; then
arch=$(go env GOHOSTARCH)
Expand Down

0 comments on commit f8d30f4

Please sign in to comment.