Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
Merge branch 'scmn-dev:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
abdfnx authored Nov 8, 2021
2 parents 2fba0f3 + df02a16 commit dc55695
Show file tree
Hide file tree
Showing 25 changed files with 2,130 additions and 331 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
branches:
- main

pull_request:
branches:
- main

env:
SM_DOCKER_REPO: https://github.com/scmn-dev/docker
SM_CONTAINER_DH_IMAGE: smcr/secman
Expand Down Expand Up @@ -47,7 +43,7 @@ jobs:
steps:
- name: Run Secman in Docker Container
run: |
secman
sudo secman
# Secman Container Docker Image `smcr/secman` | GitHub Packages
sm_container_build_ghcr:
Expand Down Expand Up @@ -77,7 +73,7 @@ jobs:
steps:
- name: Run Secman in Github Docker Container
run: |
secman
sudo secman
# Secman CLI Docker Image `smcr/secman-cli`
sm_cli_build:
Expand All @@ -98,8 +94,6 @@ jobs:
run: |
docker pull $SM_CLI_IMAGE:latest
git clone $SM_DOCKER_REPO
wget https://docker.secman.dev/secman
chmod 755 secman
docker build -t $SM_CLI_IMAGE --cache-from $SM_CLI_IMAGE:latest --file ./docker/cli/Dockerfile .
docker push $SM_CLI_IMAGE
Expand All @@ -117,4 +111,4 @@ jobs:
docker run --rm -i $SM_CLI_IMAGE
# run `secman version`
docker run --rm -i $SM_CLI_IMAGE ver
docker run --rm -i $SM_CLI_IMAGE -v
46 changes: 46 additions & 0 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Pack

on:
workflow_dispatch:
inputs:
release:
description: "The New Secman Release"
required: true

env:
RELEASE: ${{ github.event.inputs.release }}

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: 16

- name: Install Dependencies
run: yarn

- name: Pack
run: |
npm i @oclif/dev-cli -g
oclif-dev pack
- name: Format
run: |
echo "FILE_FORMAT=./dist/secman-v${{ env.RELEASE }}/secman-v${{ env.RELEASE }}" >> $GITHUB_ENV
- name: Upload It
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.RELEASE }}
files: |
${{ env.FILE_FORMAT }}-darwin-x64.tar.gz
${{ env.FILE_FORMAT }}-linux-arm.tar.gz
${{ env.FILE_FORMAT }}-linux-x64.tar.gz
${{ env.FILE_FORMAT }}-win32-x64.tar.gz
${{ env.FILE_FORMAT }}-win32-x86.tar.gz
${{ env.FILE_FORMAT }}.tar.gz
48 changes: 27 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
name: Release

on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
release:
description: "The New Secman Release"
required: true

env:
RELEASE: ${{ github.event.inputs.release }}

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: 14

- name: Install Dependencies
run: yarn

- name: Build
run: |
sudo yarn pack:deb
sudo mv ./dist/deb/secman_6.0.0-1_amd64.deb ./dist/deb/secman_v6.0.0_amd64.deb
- name: Upload It
uses: softprops/action-gh-release@v1
with:
files: ./dist/deb/secman_v6.0.0_amd64.deb
- uses: actions/checkout@v2

- uses: actions/[email protected]
with:
node-version: 16

- name: Install Dependencies
run: yarn

- name: Build
run: |
sudo yarn pack:deb
sudo mv ./dist/deb/secman_${{ env.RELEASE }}-1_amd64.deb ./dist/deb/secman_v${{ env.RELEASE }}_amd64.deb
- name: Upload It
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.RELEASE }}
files: ./dist/deb/secman_v${{ env.RELEASE }}_amd64.deb
81 changes: 19 additions & 62 deletions .github/workflows/secman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,14 @@ on:
pull_request:
branches: [ main ]

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
CLONE_DOT_SECMAN: git clone https://github.com/scmn-dev/.secman.ex

jobs:
ubuntu:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install secman (Linux)
run: curl -fsSL https://cli.secman.dev/unix | bash

- name: Clone .secman (ex folder)
run: $CLONE_DOT_SECMAN /home/runner/.secman
run: npm i -g secman

- name: Run secman
run: secman
Expand All @@ -30,71 +23,35 @@ jobs:
run: secman -h

- name: Run secman version
run: secman ver

# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2

# - name: Config
# run: $CONFIG_NAME

# - name: Install secman (MacOS)
# run: curl -fsSL https://cli.secman.dev/unix | bash

# - name: Clone .secman (ex folder)
# run: |
# echo $HOME
# $CLONE_DOT_SECMAN ~/.secman
run: secman -v

# - name: Run secman
# run: secman

# - name: Run secman Help
# run: secman -h

# - name: Run secman version
# run: secman ver

# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
dotdeb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# - name: Build secman (MacOS)
# run: |
# git clone https://github.com/scmn-dev/secman
# cd secman
# make
# make setup
- name: Install secman (Deb)
run: curl -fsSL https://cli.secman.dev | bash

# - name: Clone .secman (ex folder)
# run: |
# $CLONE_DOT_SECMAN ~/.secman
- name: Run secman
run: secman

# - name: Run secman
# run: secman
- name: Run secman Help
run: secman -h

# - name: Run secman Help
# run: secman -h
- name: Run secman version
run: secman -v

# - name: Run secman version
# run: secman ver
# homebrew:
# runs-on: macos-latest

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Install secman (Windows)
run: |
iwr -useb https://cli.secman.dev/win | iex
echo "::add-path::C:\Users\runneradmin\AppData\Local\secman\bin\;"
- name: Clone .secman (ex folder)
shell: powershell
run: git clone https://github.com/scmn-dev/.secman.ex C:\Users\runneradmin\.secman
run: npm i -g secman

- name: Run secman
run: secman
Expand All @@ -103,4 +60,4 @@ jobs:
run: secman -h

- name: Run secman version
run: secman ver
run: secman -v
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tasks:
- init: yarn
command: curl -fsSL https://unix.secman.dev | bash
command: npm i -g secman
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,53 @@
---

## [[v6.0.4] 2021-11-05](#v604-2021-11-05)

### Added

nothing

### Changed

nothing

## Fixed

- fix version command.

## [[v6.0.3] 2021-11-05](#v603-2021-11-05)

> Secman V2
this release is the first release of secman v2

it's comes with new features, new design, new infrastructure, and new secman

### Added

- Create `crypto` command.
- Create `bcrypt` command.
- Add `docs` command.
- Build `info` command.
- Add `list` command.
- Create `settings` command.
- Create `update` command.
- `logout` command.
- Build `whoami` command.

### Changed

- All secman.
- Change secman language from `golang` to `typescript`.
- The root command is `secman .` instead of `secman`. if you execute `secman`, it will show the help.
- `auth`, `delete`, `edit`, `generate`, `init`, `insert`, read` commands are totally changed.
- New help design.
- Secman is now using the secman api. it's a new way to use secman. and now users can manage their secrets from everywhere.

### Fixed

- Fix many errors, bugs, and issues.

## [[v5.3.8] 2021-09-23](#v538-2021-09-23)

### Added
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

> `secman` is a password manager can store, retrieves, generates, and synchronizes passwords, and is written in _**TypeScript**_! The most important difference is secman is not GPG cored. Instead, it uses a master password to securely store your passwords. and you can easily manage your passwords from everywhere.
## Featurs
## Features

- **Not GPG cored**.
- **It uses a master password to securely store your passwords**.
Expand All @@ -38,6 +38,12 @@

## Examples

> Initialize `~/.secman`
```bash
secman init
```

> Create a new password
```bash
Expand All @@ -56,7 +62,6 @@ Password created
```bash
secman .

.
├──Logins
│ └──Twitter
Expand All @@ -67,11 +72,10 @@ secman .
```

> Read It
```
secman read -l Twitter
╭─────────┬─────────────────────┬──────────────────┬───────────┬──────────╮
│ Title │ URL │ Username │ Password │ Extra │
├─────────┼─────────────────────┼──────────────────┼───────────┼──────────┤
Expand Down
10 changes: 10 additions & 0 deletions app/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ export default async function writeConfigFile(

if (!fs.existsSync(sm_config)) {
sh.touch(sm_config);
writeCFIle();
}

if (!fs.existsSync(sm_data)) {
sh.touch(sm_data);
writeDFile();
}
}

Expand Down Expand Up @@ -89,6 +91,14 @@ export async function writeDataFile(
);
}

export async function writeCFIle() {
await writeJSON(sm_config, {}, {});
}

export async function writeDFile() {
await writeJSON(sm_data, {}, {});
}

export async function writeSettingFile() {
await writeJSON(
sm_setting,
Expand Down
Loading

0 comments on commit dc55695

Please sign in to comment.