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