-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c14e767
commit b311f02
Showing
16 changed files
with
116 additions
and
89 deletions.
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
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,20 @@ | ||
import argparse | ||
|
||
from omegaconf import OmegaConf | ||
|
||
version_conf = OmegaConf.load("./src/configs/version.yaml") | ||
|
||
parser = argparse.ArgumentParser(description="DATS release script") | ||
parser.add_argument( | ||
"--version", | ||
type=str, | ||
help="New version to release", | ||
required=True, | ||
dest="version", | ||
) | ||
args = parser.parse_args() | ||
|
||
print(args.version) | ||
version_conf.api.version = args.version | ||
|
||
OmegaConf.save(version_conf, "./src/configs/version.yaml") |
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,2 @@ | ||
api: | ||
version: v0.0.5 |
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,27 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
if [ "${1:-}" = "" ]; then | ||
echo "Please provide a version parameter, e.g. release.sh v.0.0.3" | ||
exit 1 | ||
fi | ||
|
||
if [ "$(git diff-index --cached HEAD --)" ]; then | ||
echo "There are staged changes. Please run this script in a clean working directory." | ||
exit 1 | ||
fi | ||
|
||
cd backend | ||
make update_version VERSION="$1" | ||
|
||
read -p "Please restart the backend to make sure its OpenAPI spec is up to date. Afterwards, press any key to continue. " -n 1 -r | ||
|
||
cd ../frontend | ||
npm run update-version | ||
|
||
cd .. | ||
git tag v"$1" | ||
git add backend/src/configs/version.yaml frontend/package.json frontend/src/openapi.json | ||
# git commit "Release v$1" | ||
# git push --tags |
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
File renamed without changes.
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,11 @@ | ||
const fs = require("fs"); | ||
const { execSync } = require("child_process"); | ||
|
||
const contents = JSON.parse(fs.readFileSync("src/openapi.json")); | ||
const version = contents.info.version; | ||
|
||
const packageJson = JSON.parse(fs.readFileSync("package.json")); | ||
packageJson.version = version; | ||
fs.writeFileSync("package.json", JSON.stringify(packageJson)); | ||
|
||
execSync(`npx prettier --write package.json`); |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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