-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create rules_release * Setup release flow for bunq2ynab
- Loading branch information
Showing
46 changed files
with
3,615 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ esphome_nimble/tmp | |
node_modules | ||
|
||
rules/rules_task | ||
rules/rules_release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"bunq2ynab_release": patch | ||
--- | ||
|
||
Setup release manager for bunq2ynab docker image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", { "repo": "vgijssel/setup" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "master", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [], | ||
"privatePackages": { | ||
"version": true, | ||
"tag": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,9 @@ mutagen.yml.lock | |
|
||
local.bazelrc | ||
|
||
node_modules | ||
node_modules | ||
|
||
.pdm-python | ||
__pypackages__ | ||
keys | ||
nixos.qcow2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "setup", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": {}, | ||
"workspaces": [ | ||
"tmp/rules_release/packages/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
common --enable_bzlmod=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
load("@npm//:defs.bzl", "npm_link_all_packages") | ||
load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_library", "js_test") | ||
load("@rules_java//java:defs.bzl", "java_binary") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
npm_link_all_packages() | ||
|
||
java_binary( | ||
name = "bazel-diff", | ||
main_class = "com.bazel_diff.Main", | ||
runtime_deps = ["@bazel_diff//jar"], | ||
) | ||
|
||
js_binary( | ||
name = "cli", | ||
data = [ | ||
"lib/actions/GenerateAction.mjs", | ||
"lib/actions/PublishAction.mjs", | ||
"lib/actions/VersionAction.mjs", | ||
"lib/repositories/ChangelogRepository.mjs", | ||
"lib/repositories/ChangesetRepository.mjs", | ||
"lib/repositories/ConfigRepository.mjs", | ||
"lib/repositories/PackageRepository.mjs", | ||
"lib/repositories/PublishRepository.mjs", | ||
"lib/repositories/ReleaseRepository.mjs", | ||
"lib/repositories/TargetRepository.mjs", | ||
"lib/repositories/VersionRepository.mjs", | ||
"lib/utils.mjs", | ||
"//:node_modules/@changesets/write", | ||
"//:node_modules/commander", | ||
"//:node_modules/zx", | ||
], | ||
entry_point = "cli.mjs", | ||
env = { | ||
"WORKSPACE_NAME": repository_name().lstrip("@"), | ||
}, | ||
) | ||
|
||
js_binary( | ||
name = "changesets_cli", | ||
data = [ | ||
"//:node_modules/@changesets/changelog-github", | ||
"//:node_modules/@changesets/cli", | ||
"//:node_modules/zx", | ||
], | ||
entry_point = "changesets_cli.mjs", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
""" | ||
All the dependencies for rules_release | ||
""" | ||
|
||
module( | ||
name = "rules_release", | ||
repo_name = "rules_release", | ||
version = "0.0.0", | ||
) | ||
|
||
bazel_dep( | ||
name = "bazel_skylib", | ||
version = "1.4.2", | ||
) | ||
|
||
# ------------------------------------ rules_java ------------------------------------ # | ||
bazel_dep(name = "rules_java", version = "7.0.6") | ||
|
||
non_module_dependencies = use_extension(":extensions.bzl", "non_module_dependencies") | ||
|
||
use_repo(non_module_dependencies, "bazel_diff") | ||
|
||
# ------------------------------------ rules_js ------------------------------------ # | ||
bazel_dep( | ||
name = "aspect_rules_js", | ||
version = "1.33.1", | ||
) | ||
|
||
####### Node.js version ######### | ||
# By default you get the node version from DEFAULT_NODE_VERSION in @rules_nodejs//nodejs:repositories.bzl | ||
# Optionally you can pin a different node version: | ||
bazel_dep( | ||
name = "rules_nodejs", | ||
version = "5.8.2", | ||
) | ||
|
||
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") | ||
|
||
node.toolchain(node_version = "16.14.2") | ||
################################# | ||
|
||
npm = use_extension( | ||
"@aspect_rules_js//npm:extensions.bzl", | ||
"npm", | ||
) | ||
|
||
npm.npm_translate_lock( | ||
name = "npm", | ||
pnpm_lock = "//:pnpm-lock.yaml", | ||
verify_node_modules_ignored = "//:.bazelignore", | ||
) | ||
|
||
use_repo(npm, "npm") |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { cd } from "zx"; | ||
|
||
const workspaceDir = process.env.WORKSPACE_DIR; | ||
|
||
cd(workspaceDir); | ||
|
||
import("@changesets/cli").then(() => {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { Command } from "commander"; | ||
const program = new Command(); | ||
|
||
function collect(val, memo) { | ||
memo.push(val); | ||
return memo; | ||
} | ||
|
||
import GenerateAction from "./lib/actions/GenerateAction.mjs"; | ||
import VersionAction from "./lib/actions/VersionAction.mjs"; | ||
import PublishAction from "./lib/actions/PublishAction.mjs"; | ||
|
||
program | ||
.name("release-manager") | ||
.description("CLI to manage releases using changesets and Bazel") | ||
.option("-c, --config <items>", "Config items", collect, []) | ||
.version("0.0.0"); | ||
|
||
program | ||
.command("generate") | ||
.description( | ||
"Generate changesets based on changed targets with latest master" | ||
) | ||
.requiredOption("--bazel-diff-path <string>") | ||
.option( | ||
"--bazel-diff-args <string>", | ||
"Additional args generate hashes command for bazel-diff", | ||
"" | ||
) | ||
.action(async (options) => { | ||
const action = new GenerateAction({ | ||
configPaths: program.opts().config, | ||
bazelDiffPath: options.bazelDiffPath, | ||
bazelDiffArgs: options.bazelDiffArgs, | ||
}); | ||
await action.execute(); | ||
}); | ||
|
||
program | ||
.command("version") | ||
.description("Update version files based on changesets") | ||
.requiredOption("--changesets-path <string>") | ||
.action(async (options) => { | ||
const action = new VersionAction({ | ||
configPaths: program.opts().config, | ||
changesetsPath: options.changesetsPath, | ||
}); | ||
await action.execute(); | ||
}); | ||
|
||
program | ||
.command("publish") | ||
.description( | ||
"Run the publish scripts for each release and for the release manager" | ||
) | ||
.option( | ||
"--publish-cmd <items>", | ||
"Publish commands of the release manager", | ||
collect, | ||
[] | ||
) | ||
.action(async (options) => { | ||
const action = new PublishAction({ | ||
configPaths: program.opts().config, | ||
publishCmds: options.publishCmd, | ||
}); | ||
await action.execute(); | ||
}); | ||
|
||
program.parse(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
load("//:repositories.bzl", "dependencies") | ||
|
||
def _non_module_dependencies_impl(_ctx): | ||
dependencies() | ||
|
||
non_module_dependencies = module_extension( | ||
implementation = _non_module_dependencies_impl, | ||
) |
Oops, something went wrong.