Merge pull request #127 from acouvreur/feature/update-doc-version-on-release

Feature/update-doc-version-on-release
This commit is contained in:
Alexis Couvreur
2023-01-15 15:00:20 -05:00
committed by GitHub
12 changed files with 29 additions and 14 deletions

View File

@@ -23,7 +23,7 @@ jobs:
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
tags: ghcr.io/acouvreur/sablier:local tags: acouvreur/sablier:local
outputs: type=docker,dest=/tmp/sablier.tar outputs: type=docker,dest=/tmp/sablier.tar
- name: Upload artifact - name: Upload artifact

View File

@@ -18,4 +18,12 @@ $(PLATFORMS):
CGO_ENABLED=0 GOOS=$(os) GOARCH=$(arch) go build -tags=nomsgpack -v -ldflags="${GO_LDFLAGS}" -o 'sablier_$(VERSION)_$(os)-$(arch)' . CGO_ENABLED=0 GOOS=$(os) GOARCH=$(arch) go build -tags=nomsgpack -v -ldflags="${GO_LDFLAGS}" -o 'sablier_$(VERSION)_$(os)-$(arch)' .
release: $(PLATFORMS) release: $(PLATFORMS)
.PHONY: release $(PLATFORMS) .PHONY: release $(PLATFORMS)
LAST = 0.0.0
NEXT = 1.0.0
update-doc-version:
find . -type f \( -name "*.md" -o -name "*.yml" \) -exec sed -i 's/acouvreur\/sablier:$(LAST)/acouvreur\/sablier:$(NEXT)/g' {} +
update-doc-version-middleware:
find . -type f \( -name "*.md" -o -name "*.yml" \) -exec sed -i 's/version: "v$(LAST)"/version: "v$(NEXT)"/g' {} +

View File

@@ -183,7 +183,7 @@ sablier --help
# or # or
docker run acouvreur/sablier[:version] --help docker run acouvreur/sablier[:version] --help
# ex: docker run acouvreur/sablier:v1.0.0 --help # ex: docker run acouvreur/sablier:1.2.0 --help
``` ```
All arguments can be used in the form of the config file such as All arguments can be used in the form of the config file such as
@@ -219,7 +219,7 @@ Choose one of the Docker images and run it with one sample configuration file:
```bash ```bash
docker run -d -p 10000:10000 \ docker run -d -p 10000:10000 \
-v $PWD/sablier.yml:/etc/sablier/sablier.yml acouvreur/sablier:1.1.0 -v $PWD/sablier.yml:/etc/sablier/sablier.yml acouvreur/sablier:1.2.0
``` ```
### Use the binary distribution ### Use the binary distribution

View File

@@ -16,7 +16,7 @@ services:
- './dynamic-config.yml:/etc/traefik/dynamic-config.yml' - './dynamic-config.yml:/etc/traefik/dynamic-config.yml'
sablier: sablier:
image: acouvreur/sablier:1.1.0 image: acouvreur/sablier:1.2.0
volumes: volumes:
- '/var/run/docker.sock:/var/run/docker.sock' - '/var/run/docker.sock:/var/run/docker.sock'
labels: labels:

View File

@@ -21,7 +21,7 @@ version: 3.9
services: services:
sablier: sablier:
image: ghcr.io/acouvreur/sablier:local image: acouvreur/sablier:1.2.0
volumes: volumes:
- '/var/run/docker.sock:/var/run/docker.sock' - '/var/run/docker.sock:/var/run/docker.sock'
- '/path/to/my/themes:/etc/sablier/themes' - '/path/to/my/themes:/etc/sablier/themes'

View File

@@ -152,7 +152,7 @@
serviceAccount: sablier serviceAccount: sablier
containers: containers:
- name: sablier - name: sablier
image: acouvreur/sablier:1.1.1 image: acouvreur/sablier:1.2.0
args: args:
- "start" - "start"
- "--provider.name=kubernetes" - "--provider.name=kubernetes"

View File

@@ -17,7 +17,7 @@ experimental:
plugins: plugins:
sablier: sablier:
moduleName: "github.com/acouvreur/sablier" moduleName: "github.com/acouvreur/sablier"
version: "v1.0.0" version: "v1.2.0"
``` ```
2. Configure the plugin using the Dynamic Configuration. Example: 2. Configure the plugin using the Dynamic Configuration. Example:
@@ -79,7 +79,7 @@ services:
- './dynamic-config.yml:/etc/traefik/dynamic-config.yml' - './dynamic-config.yml:/etc/traefik/dynamic-config.yml'
sablier: sablier:
image: ghcr.io/acouvreur/sablier:local image: acouvreur/sablier:1.2.0
command: command:
- start - start
- --provider.name=docker - --provider.name=docker

View File

@@ -17,7 +17,7 @@ services:
restart: "no" restart: "no"
sablier: sablier:
image: ghcr.io/acouvreur/sablier:local image: acouvreur/sablier:local
command: command:
- start - start
- --provider.name=docker - --provider.name=docker

View File

@@ -24,7 +24,7 @@ services:
condition: none # Do not restart on setup failure condition: none # Do not restart on setup failure
sablier: sablier:
image: ghcr.io/acouvreur/sablier:local image: acouvreur/sablier:local
command: command:
- start - start
- --provider.name=swarm - --provider.name=swarm

View File

@@ -13,8 +13,8 @@ docker version
prepare_kubernetes() { prepare_kubernetes() {
docker compose -f $DOCKER_COMPOSE_FILE -p $DOCKER_COMPOSE_PROJECT_NAME up -d docker compose -f $DOCKER_COMPOSE_FILE -p $DOCKER_COMPOSE_PROJECT_NAME up -d
until kubectl get nodes | grep " Ready "; do sleep 1; done until kubectl get nodes | grep " Ready "; do sleep 1; done
echo "Loading ghcr.io/acouvreur/sablier:local into k3s..." echo "Loading acouvreur/sablier:local into k3s..."
docker save ghcr.io/acouvreur/sablier:local | docker exec -i ${DOCKER_COMPOSE_PROJECT_NAME}-server-1 ctr images import - docker save acouvreur/sablier:local | docker exec -i ${DOCKER_COMPOSE_PROJECT_NAME}-server-1 ctr images import -
echo "Loading succeeded." echo "Loading succeeded."
} }

View File

@@ -19,7 +19,7 @@ spec:
serviceAccount: sablier serviceAccount: sablier
containers: containers:
- name: sablier - name: sablier
image: ghcr.io/acouvreur/sablier:local image: acouvreur/sablier:local
args: ["start", "--provider.name=kubernetes", "--logging.level=trace"] args: ["start", "--provider.name=kubernetes", "--logging.level=trace"]
ports: ports:
- containerPort: 10000 - containerPort: 10000

View File

@@ -13,6 +13,13 @@ module.exports = {
"assets": [ "assets": [
"sablier*" "sablier*"
] ]
}],
["@semantic-release/exec", {
"publishCmd": "make LAST=${lastRelease.version} NEXT=${nextRelease.version} update-doc-version update-doc-version-middleware"
}],
["@semantic-release/git", {
"assets": ["**/*.{md,yml}"],
"message": "docs(release): update doc version from ${lastRelease.version} to ${nextRelease.version} [skip ci]"
}] }]
] ]
} }