@git.zone/cli 2.20.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,154 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ build-and-release:
10
+ runs-on: ubuntu-latest
11
+ container:
12
+ image: code.foss.global/host.today/ht-docker-node:latest
13
+
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Set up Deno
21
+ uses: denoland/setup-deno@v1
22
+ with:
23
+ deno-version: v2.x
24
+
25
+ - name: Set up Node.js
26
+ uses: actions/setup-node@v4
27
+ with:
28
+ node-version: '22'
29
+
30
+ - name: Enable corepack
31
+ run: corepack enable
32
+
33
+ - name: Install dependencies
34
+ run: {{{releaseWorkflow.installCommand}}}
35
+
36
+ - name: Get version from tag
37
+ id: version
38
+ run: |
39
+ VERSION=${GITHUB_REF#refs/tags/}
40
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
41
+ echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT
42
+ echo "Building version: $VERSION"
43
+
44
+ - name: Verify version files match tag
45
+ run: |
46
+ TAG_VERSION="${-{ steps.version.outputs.version_number }-}"
47
+ if [ -f package.json ]; then
48
+ PACKAGE_VERSION=$(node -p "JSON.parse(require('fs').readFileSync('package.json', 'utf8')).version || ''")
49
+ echo "package.json version: $PACKAGE_VERSION"
50
+ if [ -n "$PACKAGE_VERSION" ] && [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
51
+ echo "ERROR: package.json has version $PACKAGE_VERSION but tag is $TAG_VERSION"
52
+ exit 1
53
+ fi
54
+ fi
55
+ if [ -f deno.json ]; then
56
+ DENO_VERSION=$(node -p "JSON.parse(require('fs').readFileSync('deno.json', 'utf8')).version || ''")
57
+ echo "deno.json version: $DENO_VERSION"
58
+ if [ -n "$DENO_VERSION" ] && [ "$DENO_VERSION" != "$TAG_VERSION" ]; then
59
+ echo "ERROR: deno.json has version $DENO_VERSION but tag is $TAG_VERSION"
60
+ exit 1
61
+ fi
62
+ fi
63
+
64
+ - name: Build binary artifacts
65
+ run: {{{releaseWorkflow.compileCommand}}}
66
+
67
+ {{#if releaseWorkflow.includeInstallerAsset}}
68
+ - name: Stage installer asset
69
+ run: |
70
+ install -m 0755 "{{installer.file}}" "{{releaseWorkflow.binaryOutDir}}/{{installer.releaseAssetName}}"
71
+ echo "Installer asset staged: {{releaseWorkflow.binaryOutDir}}/{{installer.releaseAssetName}}"
72
+
73
+ {{/if}}
74
+ - name: Generate SHA256 checksums
75
+ run: |
76
+ if [ -d "{{releaseWorkflow.binaryOutDir}}" ]; then
77
+ cd "{{releaseWorkflow.binaryOutDir}}"
78
+ sha256sum * > SHA256SUMS.txt
79
+ cat SHA256SUMS.txt
80
+ fi
81
+
82
+ {{#if releaseWorkflow.packNpmArtifact}}
83
+ - name: Pack npm artifact
84
+ run: |
85
+ mkdir -p dist/package
86
+ pnpm pack --pack-destination dist/package
87
+ ls -lh dist/package
88
+
89
+ {{/if}}
90
+ - name: Extract release notes
91
+ run: |
92
+ VERSION="${-{ steps.version.outputs.version }-}"
93
+ if [ -f changelog.md ]; then
94
+ awk "/## $VERSION/,/## /" changelog.md | sed '$d' > /tmp/release_notes.md || true
95
+ fi
96
+ if [ ! -s /tmp/release_notes.md ]; then
97
+ cat > /tmp/release_notes.md << EOF
98
+ ## {{displayName}} $VERSION
99
+
100
+ Pre-compiled release assets for {{displayName}}.
101
+
102
+ Installation:
103
+ curl -sSL {{{installer.releaseNotesInstallUrl}}} | sudo bash
104
+ EOF
105
+ fi
106
+ cat /tmp/release_notes.md
107
+
108
+ - name: Create or update Gitea release
109
+ id: release
110
+ run: |
111
+ VERSION="${-{ steps.version.outputs.version }-}"
112
+ EXISTING_RELEASE_ID=$(curl -s \
113
+ -H "Authorization: token ${-{ secrets.GITHUB_TOKEN }-}" \
114
+ "https://{{repository.host}}/api/v1/repos/{{repository.path}}/releases/tags/$VERSION" \
115
+ | jq -r '.id // empty')
116
+
117
+ if [ -n "$EXISTING_RELEASE_ID" ]; then
118
+ echo "Updating existing release ID: $EXISTING_RELEASE_ID"
119
+ curl -X PATCH -s \
120
+ -H "Authorization: token ${-{ secrets.GITHUB_TOKEN }-}" \
121
+ -H "Content-Type: application/json" \
122
+ "https://{{repository.host}}/api/v1/repos/{{repository.path}}/releases/$EXISTING_RELEASE_ID" \
123
+ -d "{\"name\": \"{{displayName}} $VERSION\", \"body\": $(jq -Rs . /tmp/release_notes.md), \"draft\": false, \"prerelease\": false}"
124
+ echo "release_id=$EXISTING_RELEASE_ID" >> $GITHUB_OUTPUT
125
+ else
126
+ RELEASE_ID=$(curl -X POST -s \
127
+ -H "Authorization: token ${-{ secrets.GITHUB_TOKEN }-}" \
128
+ -H "Content-Type: application/json" \
129
+ "https://{{repository.host}}/api/v1/repos/{{repository.path}}/releases" \
130
+ -d "{\"tag_name\": \"$VERSION\", \"name\": \"{{displayName}} $VERSION\", \"body\": $(jq -Rs . /tmp/release_notes.md), \"draft\": false, \"prerelease\": false}" \
131
+ | jq -r '.id')
132
+ echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
133
+ fi
134
+
135
+ - name: Upload release assets
136
+ run: |
137
+ RELEASE_ID="${-{ steps.release.outputs.release_id }-}"
138
+ for artifact in{{#each releaseWorkflow.assetGlobs}} {{{this}}}{{/each}}; do
139
+ [ -f "$artifact" ] || continue
140
+ filename=$(basename "$artifact")
141
+ echo "Uploading $filename..."
142
+ curl -X POST -s \
143
+ -H "Authorization: token ${-{ secrets.GITHUB_TOKEN }-}" \
144
+ -H "Content-Type: application/octet-stream" \
145
+ --data-binary "@$artifact" \
146
+ "https://{{repository.host}}/api/v1/repos/{{repository.path}}/releases/$RELEASE_ID/assets?name=$filename"
147
+ done
148
+
149
+ - name: Release summary
150
+ run: |
151
+ echo "Release ${-{ steps.version.outputs.version }-} complete"
152
+ echo "Installation command:"
153
+ VERSION="${-{ steps.version.outputs.version }-}"
154
+ echo "curl -sSL {{{installer.releaseNotesInstallUrl}}} | sudo bash"
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@git.zone/cli',
6
- version: '2.20.0',
6
+ version: '2.22.0',
7
7
  description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxlQUFlO0lBQ3JCLE9BQU8sRUFBRSxRQUFRO0lBQ2pCLFdBQVcsRUFBRSwrTEFBK0w7Q0FDN00sQ0FBQSJ9