Compare commits

...

7 Commits

Author SHA1 Message Date
9f0c85e8d3 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 14:18:10 +02:00
66ea0ee96d up 2024-08-13 00:52:51 +02:00
5489463885 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 00:41:16 +02:00
cf1eca0e5c up
Some checks failed
continuous-integration/drone/tag Build is failing
2024-08-13 00:33:07 +02:00
5a28602203 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 00:06:19 +02:00
9b3cd8cbcc feature: wedoxa 2024-08-13 00:03:54 +02:00
b7608be252 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 00:02:23 +02:00
4 changed files with 10 additions and 87 deletions

View File

@ -1,59 +1,22 @@
kind: pipeline
type: ssh
name: default
server:
host: build.gextra.net
user: root
ssh_key:
from_secret: ssh_key_secret
trigger:
event:
- tag
steps:
- name: build
image: node
commands:
- npm install -g vsce
- npm ci
- vsce package
- name: gitea_release
environment:
GITEA_TOKEN:
image: plugins/gitea-release
settings:
base_url: https://gitea.raphaelpiccolo.com
files: ./*.vsix
api_key:
from_secret: gitea_token
commands:
- bash gitearelease.sh
# - name: gitea_release
# image: plugins/gitea-release
# settings:
# base_url: https://gitea.raphaelpiccolo.com
# files: "*.vsix"
# api_key:
# from_secret: gitea_token
# - name: deploy
# environment:
# PASSWORD:
# from_secret: password
# when:
# status:
# - success
# - failure
# commands:
# - |
# curl --fail-with-body -s -X POST \
# --data-urlencode "digest=$(docker inspect registry.raphaelpiccolo.com/$DRONE_REPO_NAME:latest | jq -r '.[0].RepoDigests[0]' | cut -d@ -f 2)" \
# --data-urlencode "start=$DRONE_BUILD_CREATED" \
# --data-urlencode "url=$DRONE_BUILD_LINK" \
# --data-urlencode "buildNumber=$DRONE_BUILD_NUMBER" \
# --data-urlencode "version=$DRONE_TAG" \
# --data-urlencode "name=$DRONE_REPO_NAME" \
# --data-urlencode "size=$(docker inspect -f '{{ .Size }}' "$DRONE_REPO_NAME")" \
# --data-urlencode "status=$DRONE_BUILD_STATUS" \
# "https://admin:$PASSWORD@monitoring.raphaelpiccolo.com/fr/dronehook"
# - name: test
# commands:
# - docker run --rm cvtest npm test

View File

@ -1,40 +0,0 @@
#!/bin/bash
# Variables
# GITEA_TOKEN=""
# DRONE_TAG="1.1.6"
# DRONE_REPO_NAME="vscodestat"
# DRONE_REPO_OWNER="root"
GITEA_API_URL="https://gitea.raphaelpiccolo.com/api/v1"
TAG_NAME="v${DRONE_TAG}"
RELEASE_NAME="Release ${DRONE_TAG}"
RELEASE_BODY="vscode extension generated"
ARTIFACT_PATH="${DRONE_REPO_NAME}-${DRONE_TAG}.vsix"
# Create a release
response=$(curl -s -X POST "${GITEA_API_URL}/repos/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/releases" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"${TAG_NAME}\",
\"name\": \"${RELEASE_NAME}\",
\"body\": \"${RELEASE_BODY}\",
\"draft\": false,
\"prerelease\": false
}")
# Extract release ID from the response
release_id=$(echo $response | jq '.id')
if [ -z "$release_id" ]; then
echo "Failed to create release"
exit 1
fi
# Upload the artifact
curl -s -X POST "${GITEA_API_URL}/repos/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/releases/${release_id}/assets?name=$(basename ${ARTIFACT_PATH})" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: $(file -b --mime-type ${ARTIFACT_PATH})" \
--data-binary @"${ARTIFACT_PATH}"
echo "Artifact uploaded successfully."

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "vscodestat",
"version": "1.1.7",
"version": "1.1.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "vscodestat",
"version": "1.1.7",
"version": "1.1.12",
"license": "ISC",
"devDependencies": {
"@types/mocha": "^10.0.7",

View File

@ -1,7 +1,7 @@
{
"name": "vscodestat",
"displayName": "vscodestat",
"version": "1.1.7",
"version": "1.1.12",
"description": "",
"categories": [
"Other"