Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
allan committed Feb 10, 2023
2 parents 6c79031 + c7a5712 commit bb7892a
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Repo metadata
- name: Repo metadata
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
# Set up Buildx env
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

# Login
- name: Login to GitHub Container Registry
Expand All @@ -65,7 +65,7 @@ jobs:

# Build image and push to registry
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vscode-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.2
FROM golang:1.19-bullseye as builder
FROM golang:1.20-bullseye as builder
LABEL maintainer="[email protected]"
ENV DOCKER_BUILDKIT=1
#
Expand Down
47 changes: 46 additions & 1 deletion extensions/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import * as _ from "lodash";
import * as mkdirp from "mkdirp";
import { newScaffold } from "./commands";
//
let homeDir = os.homedir();
let CONFIG_PATH : string;
//
// This method is called when your extension is activated
// Your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {
Expand All @@ -12,6 +16,11 @@ export function activate(context: vscode.ExtensionContext) {
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "go-ddd-scaffold" is now active!');
//
CONFIG_PATH = getConfigPath(CONFIG_NAME);
/// https://github.com/Microsoft/vscode-extension-samples/blob/master/configuration-sample/src/extension.ts
//console.log(ConfigurationTarget.Workspace);
console.log(`CONFIG_PATH = ${CONFIG_PATH}`);
//
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
Expand All @@ -30,4 +39,40 @@ export function activate(context: vscode.ExtensionContext) {
//
// This method is called when your extension is deactivated
export function deactivate() {}
//
//
///
window.onDidChangeActiveTextEditor(function(event){
console.log("onDidChangeActiveTextEditor "+event);
});
//
///
async function promptForTargetFiles(): Promise<string | undefined> {
console.log("promptForTargetFiles()");
const options: OpenDialogOptions = {
canSelectMany: false,
openLabel: "Select a file to upload",
canSelectFolders: false,
canSelectFiles: true,
};

return window.showOpenDialog(options).then(uri => {
if (_.isNil(uri) || _.isEmpty(uri)) {
return undefined;
}
return uri[0].fsPath;
});
}
///

//
function createDirectory(targetDirectory: string): Promise<void> {
return new Promise((resolve, reject) => {
mkdirp(targetDirectory, { mode: '0777' }).then(made => {
if(made){
return reject(made);
}
resolve();
});
});
}
///
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/urfave/cli/v2 v2.23.7
github.com/urfave/cli/v2 v2.24.3
gopkg.in/yaml.v3 v3.0.1 // indirect
)
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/urfave/cli/v2 v2.23.7 h1:YHDQ46s3VghFHFf1DdF+Sh7H4RqhcM+t0TmZRJx4oJY=
github.com/urfave/cli/v2 v2.23.7/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
github.com/urfave/cli/v2 v2.24.2 h1:q1VA+ofZ8SWfEKB9xXHUD4QZaeI9e+ItEqSbfH2JBXk=
github.com/urfave/cli/v2 v2.24.2/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
github.com/urfave/cli/v2 v2.24.3 h1:7Q1w8VN8yE0MJEHP06bv89PjYsN4IHWED2s1v/Zlfm0=
github.com/urfave/cli/v2 v2.24.3/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}
2 changes: 1 addition & 1 deletion template/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.2
FROM golang:1.19-bullseye as builder
FROM golang:1.20-bullseye as builder
LABEL maintainer="[email protected]"
ENV DOCKER_BUILDKIT=1
#
Expand Down

0 comments on commit bb7892a

Please sign in to comment.