Skip to content

Commit 74eadf6

Browse files
authored
Merge pull request #553 from sylhare/release-2.5.1
Release v2.5.1
2 parents 793613b + 261efac commit 74eadf6

6 files changed

Lines changed: 4 additions & 32 deletions

File tree

.github/cli/src/release.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,11 @@ export function updatePackageLockJson(filePath: string, newVersion: string): voi
4848
});
4949
}
5050

51-
export function updateGemBuildWorkflow(filePath: string, newVersion: string): void {
52-
updateVersionInFile(
53-
filePath,
54-
/(gem install type-on-strap --version ")[^"]+(")/,
55-
`$1${newVersion}$2`
56-
);
57-
}
58-
5951
export function release(newVersion: string, root: string): void {
6052
updateGemspec(path.join(root, 'type-on-strap.gemspec'), newVersion);
6153
updateDefaultHtml(path.join(root, '_layouts/default.html'), newVersion);
6254
updatePackageJson(path.join(root, 'package.json'), newVersion);
6355
updatePackageLockJson(path.join(root, 'package-lock.json'), newVersion);
64-
updateGemBuildWorkflow(path.join(root, '.github/workflows/gem-build.yml'), newVersion);
6556
logger.success(`Version bumped to ${newVersion}`);
6657
}
6758

.github/cli/test/release.test.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
parseVersion,
66
release,
77
updateDefaultHtml,
8-
updateGemBuildWorkflow,
98
updateGemspec,
109
updatePackageJson,
1110
updatePackageLockJson,
@@ -109,30 +108,13 @@ describe('release.ts', () => {
109108
});
110109
});
111110

112-
describe('updateGemBuildWorkflow()', () => {
113-
test('replaces version in gem install command', () => {
114-
const content = 'gem install type-on-strap --version "2.4.11" --source "https://rubygems.pkg.github.com/sylhare"\n';
115-
jest.spyOn(fs, 'readFileSync').mockReturnValue(content as any);
116-
const write = jest.spyOn(fs, 'writeFileSync').mockImplementation(() => {
117-
});
118-
119-
updateGemBuildWorkflow('/fake/.github/workflows/gem-build.yml', '2.6.0');
120-
121-
expect(write).toHaveBeenCalledWith(
122-
'/fake/.github/workflows/gem-build.yml',
123-
'gem install type-on-strap --version "2.6.0" --source "https://rubygems.pkg.github.com/sylhare"\n'
124-
);
125-
});
126-
});
127-
128111
describe('release()', () => {
129112
test('calls all updaters and logs the new version', () => {
130113
const current = '2.4.11';
131114
jest.spyOn(fs, 'readFileSync').mockImplementation((filePath: unknown) => {
132115
const p = filePath as string;
133116
if (p.endsWith('.gemspec')) return `spec.version = "${current}"` as any;
134117
if (p.endsWith('default.html')) return `Type on Strap jekyll theme v${current}` as any;
135-
if (p.endsWith('gem-build.yml')) return `gem install type-on-strap --version "${current}"` as any;
136118
return `{"version":"${current}","packages":{"":{"version":"${current}"}}}` as any;
137119
});
138120
jest.spyOn(fs, 'writeFileSync').mockImplementation(() => {
@@ -146,7 +128,6 @@ describe('release.ts', () => {
146128
expect(fs.writeFileSync).toHaveBeenCalledWith(expect.stringContaining('default.html'), expect.any(String));
147129
expect(fs.writeFileSync).toHaveBeenCalledWith(expect.stringContaining('package.json'), expect.any(String));
148130
expect(fs.writeFileSync).toHaveBeenCalledWith(expect.stringContaining('package-lock.json'), expect.any(String));
149-
expect(fs.writeFileSync).toHaveBeenCalledWith(expect.stringContaining('gem-build.yml'), expect.any(String));
150131
});
151132
});
152133
});

.github/workflows/gem-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
- name: GPR
4242
run: |
4343
gem cleanup type-on-strap
44-
gem install type-on-strap --version "2.4.11" --source "https://rubygems.pkg.github.com/sylhare"
44+
gem install type-on-strap --source "https://rubygems.pkg.github.com/sylhare"

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html>
22
<!--
3-
Type on Strap jekyll theme v2.5.0
3+
Type on Strap jekyll theme v2.5.1
44
Theme free for personal and commercial use under the MIT license
55
https://github.com/sylhare/Type-on-Strap/blob/master/LICENSE
66
-->

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "type-on-strap-helper",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"description": "CLI utilities for the Type on Strap jekyll theme",
55
"scripts": {
66
"post": "tsx .github/cli/src/post.ts",

type-on-strap.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |spec|
44
spec.name = "type-on-strap"
5-
spec.version = "2.5.0"
5+
spec.version = "2.5.1"
66
spec.authors = ["Sylhare", "Rohan Chandra"]
77
spec.email = ["sylhare@outlook.com", "hellorohan@outlook.com"]
88

0 commit comments

Comments
 (0)