forked from godatadriven/databricks-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·44 lines (32 loc) · 862 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
set -eu
# Possible values: patch, minor, major
BUMP_LEVEL=$1
IMAGE_NAME="databricks-cdk-lambda"
echo "bump level: ${BUMP_LEVEL}"
## Version bump
cd typescript
NEW_VERSION=$(npm version "${BUMP_LEVEL}")
git add package.json package-lock.json
echo "new version: ${NEW_VERSION}"
rm -r dist
npx tsc
cd ../aws-lambda
poetry version "${NEW_VERSION}"
poetry update
git add pyproject.toml poetry.lock
git commit -m "Bump version to ${NEW_VERSION}"
git tag "${NEW_VERSION}"
## docker build
docker build -t "${IMAGE_NAME}:dev" .
docker tag "${IMAGE_NAME}:dev" "ffinfo/${IMAGE_NAME}:dev"
docker tag "${IMAGE_NAME}:dev" "ffinfo/${IMAGE_NAME}:${NEW_VERSION}"
docker push "ffinfo/${IMAGE_NAME}:dev"
docker push "ffinfo/${IMAGE_NAME}:${NEW_VERSION}"
# TODO: fix token
#poetry publish
cd ../typescript
npm publish
cd ../
git push
git push --tags