chore: update new entry point
This commit is contained in:
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
GOOS=$GOOS GOARCH=$GOARCH go build \
|
||||
-ldflags="-s -w -X github.com/versenilvis/iris/root.Version=${{ steps.version.outputs.version }}" \
|
||||
-trimpath -o "dist/iris" main.go
|
||||
-trimpath -o "dist/iris" ./cmd/iris
|
||||
|
||||
cd dist
|
||||
tar -czf "iris_${GOOS}_${GOARCH}.tar.gz" "iris"
|
||||
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
echo "Building $GOOS/$GOARCH..."
|
||||
GOOS=$GOOS GOARCH=$GOARCH go build \
|
||||
-ldflags="-s -w -X github.com/versenilvis/iris/root.Version=${{ github.ref_name }}" \
|
||||
-trimpath -o "dist/$output_name" main.go
|
||||
-trimpath -o "dist/$output_name" ./cmd/iris
|
||||
|
||||
cd dist
|
||||
tar -czf "iris_${GOOS}_${GOARCH}.tar.gz" "$output_name"
|
||||
@@ -70,15 +70,14 @@ jobs:
|
||||
run: |
|
||||
# Generate standard GitHub release notes
|
||||
GEN_NOTES=$(gh api repos/${{ github.repository }}/releases/generate-notes -f tag_name=${{ github.ref_name }} --jq .body)
|
||||
cat <<EOF > release_notes.md
|
||||
$GEN_NOTES
|
||||
|
||||
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
|
||||
echo "$GEN_NOTES" >> $GITHUB_ENV
|
||||
echo "" >> $GITHUB_ENV
|
||||
echo "## Installation" >> $GITHUB_ENV
|
||||
echo "\`\`\`bash" >> $GITHUB_ENV
|
||||
echo "curl -sS https://raw.githubusercontent.com/versenilvis/iris/main/scripts/install.sh | sh" >> $GITHUB_ENV
|
||||
echo "\`\`\`" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
## Installation
|
||||
\`\`\`bash
|
||||
curl -sS https://raw.githubusercontent.com/versenilvis/iris/main/scripts/install.sh | sh
|
||||
\`\`\`
|
||||
EOF
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -87,7 +86,7 @@ jobs:
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: ${{ github.ref_name }}
|
||||
body: ${{ env.RELEASE_BODY }}
|
||||
body_path: release_notes.md
|
||||
files: dist/*.tar.gz
|
||||
generate_release_notes: false
|
||||
env:
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
# build binary file
|
||||
[group('build')]
|
||||
build:
|
||||
@go build -o iris main.go
|
||||
@go build -o iris ./cmd/iris
|
||||
|
||||
# build with optimized binary file
|
||||
[group('build')]
|
||||
optimized-build:
|
||||
@GOAMD64=v4 go build -ldflags="-s -w" -trimpath -o iris main.go
|
||||
@GOAMD64=v4 go build -ldflags="-s -w" -trimpath -o iris ./cmd/iris
|
||||
|
||||
# run iris
|
||||
[group('dev')]
|
||||
@@ -24,7 +24,7 @@ config-init:
|
||||
[group('dev')]
|
||||
[linux, macos]
|
||||
reload:
|
||||
@go build -o iris main.go
|
||||
@go build -o iris ./cmd/iris
|
||||
@if [ -f ~/.local/bin/iris ]; then rm -f ~/.local/bin/iris && cp ./iris ~/.local/bin/iris; fi
|
||||
@if [ -n "${IRIS_PID:-}" ]; then kill -USR1 $IRIS_PID 2>/dev/null || true; fi
|
||||
@if [ -z "${IRIS_FD:-}" ]; then ./iris; fi
|
||||
@@ -90,7 +90,7 @@ debug-notify version="v1.99.0":
|
||||
# usage: just build-release v1.2.0
|
||||
[group('debug')]
|
||||
build-release version:
|
||||
@GOAMD64=v3 go build -pgo=auto -ldflags="-s -w -X github.com/versenilvis/iris/root.Version={{version}}" -trimpath -o iris main.go
|
||||
@GOAMD64=v3 go build -pgo=auto -ldflags="-s -w -X github.com/versenilvis/iris/root.Version={{version}}" -trimpath -o iris ./cmd/iris
|
||||
|
||||
# test the install script locally
|
||||
# usage: just debug-install v1.0.0
|
||||
@@ -119,7 +119,7 @@ debug-install version="v1.0.0":
|
||||
ARCHIVE_NAME="iris_${OS}_${ARCH}.tar.gz"
|
||||
|
||||
echo "building iris ({{version}}, ${OS}_${ARCH})..."
|
||||
go build -ldflags="-X github.com/versenilvis/iris/root.Version={{version}}" -o "$TMP/iris" main.go
|
||||
go build -ldflags="-X github.com/versenilvis/iris/root.Version={{version}}" -o "$TMP/iris" ./cmd/iris
|
||||
|
||||
echo "packaging archive ($ARCHIVE_NAME)..."
|
||||
tar -czf "$TMP/$ARCHIVE_NAME" -C "$TMP" iris
|
||||
|
||||
Reference in New Issue
Block a user