Skip to content

Commit

Permalink
fix: broken release (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Feb 3, 2023
1 parent bf8b93a commit 0a8bd9a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 39 deletions.
33 changes: 8 additions & 25 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>renovatebot/.github",
":pinDependencies"
],
"extends": ["github>renovatebot/.github", ":pinDependencies"],
"packageRules": [
{
"description": "Automerge Renovate updates",
"semanticCommitType": "fix",
"matchPackageNames": [
"renovate/renovate"
],
"matchUpdateTypes": [
"major",
"minor",
"patch"
]
"matchPackageNames": ["renovate/renovate"],
"matchUpdateTypes": ["major", "minor", "patch"]
},
{
"description": "Update references in markdown files weekly",
"matchPaths": [
"**/*.md"
],
"extends": [
"schedule:weekly"
],
"matchPaths": ["**/*.md"],
"extends": ["schedule:weekly"],
"automerge": true,
"stabilityDays": 0,
"separateMajorMinor": false,
Expand All @@ -36,18 +23,14 @@
],
"regexManagers": [
{
"fileMatch": [
"^src/docker\\.ts$"
],
"fileMatch": ["^src/docker\\.ts$"],
"matchStrings": [
"// renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s+readonly\\s+tag\\s+=\\s+'(?<currentValue>.+?)';"
"// renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s+const\\s+tag\\s+=\\s+'(?<currentValue>.+?)';"
],
"versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}"
},
{
"fileMatch": [
"^README\\.md$"
],
"fileMatch": ["^README\\.md$"],
"matchStrings": [
"uses: renovatebot/github-action@(?<currentValue>[^\\s]+)"
],
Expand Down
21 changes: 11 additions & 10 deletions src/docker.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import type { Input } from './input';

// renovate: datasource=docker depName=renovate/renovate versioning=docker
const tag = '34.121.0-slim';

class Docker {
readonly repository = 'renovate/renovate';
// renovate: datasource=docker depName=renovate/renovate versioning=docker
readonly tag = '34.121.0-slim';
readonly tagSuffix = '-slim';
readonly fullTag: string;
private static readonly repository = 'renovate/renovate';
private static readonly tagSuffix = '-slim';
private readonly fullTag: string;

constructor(private input: Input) {
this.fullTag = input.useSlim() ? this.tag : this.tag.replace(this.tagSuffix, '');
constructor(input: Input) {
this.fullTag = input.useSlim() ? tag : tag.replace(Docker.tagSuffix, '');
}

image(): string {
return `${this.repository}:${this.fullTag}`;
return `${Docker.repository}:${this.fullTag}`;
}

version(): string {
return this.fullTag;
static version(): string {
return tag.replace(Docker.tagSuffix, '');
}
}

Expand Down
5 changes: 1 addition & 4 deletions src/get-version.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import * as core from '@actions/core';
import Docker from './docker';
import { Input } from './input';

const input = new Input();
const docker = new Docker(input);
core.setOutput('version', docker.version());
core.setOutput('version', Docker.version());

0 comments on commit 0a8bd9a

Please sign in to comment.