Skip to content

Commit

Permalink
chore: replaces vmware-tanzu references with carvel-dev (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanisfahmyDE authored Jan 21, 2023
1 parent 11fa2b1 commit a115074
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/inclusive-language-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ on:

jobs:
check-inclusive-language:
uses: vmware-tanzu/carvel-release-scripts/.github/workflows/inclusive-language-check.yml@main
uses: carvel-dev/release-scripts/.github/workflows/inclusive-language-check.yml@main
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,6 @@ Thumbs.db

# Ignore built ts files
tests/runner/*
lib/**/*
lib/**/*

.idea
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ If you forget, the `check build up to date` build step will fail.
## Releasing

1. Publish a release to the Marketplace with a semver name, e.g. `v1.2.3`. (Note: the `v` prefix is important, as are the minor and patch versions. `1.2.3` and `v1.2` aren't valid if you want the automated workflow in #2 to do its thing.)
2. If this is the latest release per semver naming then the [release workflow](https://github.com/vmware-tanzu/carvel-setup-action/actions?query=workflow%3Arelease) will automatically update the major tag for the release (e.g. if you release v1.2.3 it will update the `v1` tag to point to the same commit as `v1.2.3`).
2. If this is the latest release per semver naming then the [release workflow](https://github.com/carvel-dev/setup-action/actions?query=workflow%3Arelease) will automatically update the major tag for the release (e.g. if you release v1.2.3 it will update the `v1` tag to point to the same commit as `v1.2.3`).
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# carvel-setup-action

[![Build Status](https://github.com/vmware-tanzu/carvel-setup-action/workflows/build/badge.svg?branch=develop)](https://github.com/vmware-tanzu/carvel-setup-action/actions?query=branch%3Adevelop+workflow%3Abuild)
[![Release Status](https://github.com/vmware-tanzu/carvel-setup-action/workflows/release/badge.svg)](https://github.com/vmware-tanzu/carvel-setup-action/actions?query=workflow%3Arelease)
[![Build Status](https://github.com/carvel-dev/setup-action/workflows/build/badge.svg?branch=develop)](https://github.com/carvel-dev/setup-action/actions?query=branch%3Adevelop+workflow%3Abuild)
[![Release Status](https://github.com/carvel-dev/setup-action/workflows/release/badge.svg)](https://github.com/carvel-dev/setup-action/actions?query=workflow%3Arelease)

A [Github Action](https://github.com/features/actions) to install [Carvel apps](https://carvel.dev/) (ytt, kbld, kapp, kwt, imgpkg, vendir and kctrl).

Expand All @@ -13,7 +13,7 @@ By default, installs latest versions of `ytt`, `kbld`, `kapp`, `kwt`, `imgpkg`,

```yaml
steps:
- uses: vmware-tanzu/carvel-setup-action@v1
- uses: carvel-dev/setup-action@v1
- run: |
ytt version
kbld version
Expand All @@ -23,7 +23,7 @@ steps:

```yaml
steps:
- uses: vmware-tanzu/carvel-setup-action@v1
- uses: carvel-dev/setup-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: |
Expand All @@ -35,7 +35,7 @@ To install only specific apps:

```yaml
steps:
- uses: vmware-tanzu/carvel-setup-action@v1
- uses: carvel-dev/setup-action@v1
with:
only: ytt, kbld
- run: |
Expand All @@ -47,7 +47,7 @@ To exclude specific apps:

```yaml
steps:
- uses: vmware-tanzu/carvel-setup-action@v1
- uses: carvel-dev/setup-action@v1
with:
exclude: kwt, vendir
- run: |
Expand All @@ -59,7 +59,7 @@ To use a specific version of an app:

```yaml
steps:
- uses: vmware-tanzu/carvel-setup-action@v1
- uses: carvel-dev/setup-action@v1
with:
only: ytt, kbld
kbld: v0.28.0
Expand All @@ -70,4 +70,4 @@ steps:

## Development

See [DEVELOPMENT](https://github.com/vmware-tanzu/carvel-setup-action/blob/develop/DEVELOPMENT.md).
See [DEVELOPMENT](https://github.com/carvel-dev/setup-action/blob/develop/DEVELOPMENT.md).
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9614,16 +9614,16 @@ class CarvelReleasesService extends gha_installer_1.GitHubReleasesService {
exports.CarvelReleasesService = CarvelReleasesService;
function getRepo(app) {
return {
owner: 'vmware-tanzu',
owner: 'carvel-dev',
repo: getRepoName(app)
};
}
exports.getRepo = getRepo;
function getRepoName(app) {
if (app.name === 'kctrl') {
return 'carvel-kapp-controller';
return 'kapp-controller';
}
return `carvel-${app.name}`;
return `${app.name}`;
}
function getAssetName(platform, app) {
return `${app.name}-${getAssetSuffix(platform)}`;
Expand Down
6 changes: 3 additions & 3 deletions src/carvel_releases_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ export class CarvelReleasesService extends GitHubReleasesService {

export function getRepo(app: AppInfo): ReposListReleasesParameters {
return {
owner: 'vmware-tanzu',
owner: 'carvel-dev',
repo: getRepoName(app)
}
}

function getRepoName(app: AppInfo): string {
if (app.name === 'kctrl') {
return 'carvel-kapp-controller'
return 'kapp-controller'
}
return `carvel-${app.name}`
return `${app.name}`
}

export function getAssetName(platform: string, app: AppInfo): string {
Expand Down
8 changes: 4 additions & 4 deletions test/unit/carvel_releases_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ describe('CarvelReleasesService', () => {
describe('getRepo', () => {
it("returns the name of the repo for the app", () => {
expect(getRepo(kbldInfo)).toEqual({
owner: "vmware-tanzu",
repo: "carvel-kbld"
owner: "carvel-dev",
repo: "kbld"
})
// kctrl is a special case
expect(getRepo(kctrlInfo)).toEqual({
owner: "vmware-tanzu",
repo: "carvel-kapp-controller"
owner: "carvel-dev",
repo: "kapp-controller"
})
})
})
Expand Down
14 changes: 7 additions & 7 deletions test/unit/installer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const assetNames = {
win32: "ytt-windows-amd64.exe"
}
const downloadUrls = {
linux: "https://example.com/vmware-tanzu/carvel-ytt/releases/download/0.28.0/ytt-linux-amd64",
win32: "https://example.com/vmware-tanzu/carvel-ytt/releases/download/0.28.0/ytt-windows-amd64.exe"
linux: "https://example.com/carvel-dev/ytt/releases/download/0.28.0/ytt-linux-amd64",
win32: "https://example.com/carvel-dev/ytt/releases/download/0.28.0/ytt-windows-amd64.exe"
}
const downloadPaths = {
linux: "/downloads/ytt-linux-amd64",
Expand All @@ -38,7 +38,7 @@ describe('Installer', () => {
cache = mock<ActionsToolCache>()
fs = mock<FileSystem>()
octokit = createTestOctokit()
octokit.stubListReleasesResponse({ owner: 'vmware-tanzu', repo: 'carvel-ytt' }, [
octokit.stubListReleasesResponse({ owner: 'carvel-dev', repo: 'ytt' }, [
releaseJsonFor('ytt', '0.10.1'), // a more recent security patch
releaseJsonFor('ytt', '0.28.0'), // the latest version by semver number
releaseJsonFor('ytt', '0.27.0')
Expand All @@ -65,10 +65,10 @@ describe('Installer', () => {
return {
tag_name: version,
assets: [{
browser_download_url: `https://example.com/vmware-tanzu/carvel-${app}/releases/download/${version}/${app}-linux-amd64`,
browser_download_url: `https://example.com/carvel-dev/${app}/releases/download/${version}/${app}-linux-amd64`,
name: `${app}-linux-amd64`
}, {
browser_download_url: `https://example.com/vmware-tanzu/carvel-${app}/releases/download/${version}/${app}-windows-amd64.exe`,
browser_download_url: `https://example.com/carvel-dev/${app}/releases/download/${version}/${app}-windows-amd64.exe`,
name: `${app}-windows-amd64.exe`
}],
body: `* some cool new features\n${expectedChecksums.linux}\n${expectedChecksums.win32}`
Expand All @@ -89,7 +89,7 @@ describe('Installer', () => {

await installer.installApp({ name: 'ytt', version: 'latest' })

expect(core.info).toHaveBeenCalledWith("Downloading ytt 0.28.0 from https://example.com/vmware-tanzu/carvel-ytt/releases/download/0.28.0/ytt-linux-amd64")
expect(core.info).toHaveBeenCalledWith("Downloading ytt 0.28.0 from https://example.com/carvel-dev/ytt/releases/download/0.28.0/ytt-linux-amd64")
expect(core.info).toHaveBeenCalledWith(`✅ Verified checksum: "dbd318c1c462aee872f41109a4dfd3048871a03dedd0fe0e757ced57dad6f2d7 ./ytt-linux-amd64"`)
expect(fs.chmodSync).toHaveBeenCalledWith(downloadPaths.linux, "755")
expect(core.addPath).toHaveBeenCalledWith(binPaths.linux)
Expand All @@ -102,7 +102,7 @@ describe('Installer', () => {

await installer.installApp({ name: 'ytt', version: '0.28.0' })

expect(core.info).toHaveBeenCalledWith("Downloading ytt 0.28.0 from https://example.com/vmware-tanzu/carvel-ytt/releases/download/0.28.0/ytt-windows-amd64.exe")
expect(core.info).toHaveBeenCalledWith("Downloading ytt 0.28.0 from https://example.com/carvel-dev/ytt/releases/download/0.28.0/ytt-windows-amd64.exe")
expect(core.info).toHaveBeenCalledWith(`✅ Verified checksum: "dbd318c1c462aee872f41109a4dfd3048871a03dedd0fe0e757ced57dad6f2d7 ./ytt-windows-amd64.exe"`)
expect(fs.chmodSync).toHaveBeenCalledWith(downloadPaths.win32, "755")
expect(core.addPath).toHaveBeenCalledWith(binPaths.win32)
Expand Down

0 comments on commit a115074

Please sign in to comment.