Skip to content

Commit

Permalink
change bots package version naming
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy-da committed Aug 16, 2021
1 parent 60fc442 commit 932f47a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
DIT_NAME=$(shell ddit targetname)
BASENAME=$(shell ddit targetname --basename)
VERSION=$(shell ddit ditversion)
BOT_VERSION=$(shell ddit ditversion | sed "s/-rc./rc/")

NAME=${BASENAME}-${VERSION}

PKG_FILES=$(shell find pkg -type f)

PYTHON := pipenv run python

operator_bot := target/daml-chat-operator-bot-$(VERSION).tar.gz
user_bot := target/daml-chat-user-bot-$(VERSION).tar.gz
operator_bot := target/daml-chat-operator-bot-$(BOT_VERSION).tar.gz
user_bot := target/daml-chat-user-bot-$(BOT_VERSION).tar.gz
ui := target/daml-chat-ui-$(VERSION).zip

.PHONY: all package publish
Expand All @@ -29,17 +30,17 @@ target:
mkdir $@

$(operator_bot):
cd python/operator && DDIT_VERSION=$(VERSION) $(PYTHON) setup.py sdist
cd python/operator && DDIT_VERSION=$(BOT_VERSION) $(PYTHON) setup.py sdist
rm -fr python/operator/daml_chat_operator_bot.egg-info
mkdir -p $(@D)
mv python/operator/dist/daml-chat-operator-bot-$(VERSION).tar.gz $@
mv python/operator/dist/daml-chat-operator-bot-$(BOT_VERSION).tar.gz $@
rm -r python/operator/dist

$(user_bot):
cd python/user && DDIT_VERSION=$(VERSION) $(PYTHON) setup.py sdist
cd python/user && BOT_VERSION=$(BOT_VERSION) $(PYTHON) setup.py sdist
rm -fr python/user/daml_chat_user_bot.egg-info
mkdir -p $(@D)
mv python/user/dist/daml-chat-user-bot-$(VERSION).tar.gz $@
mv python/user/dist/daml-chat-user-bot-$(BOT_VERSION).tar.gz $@
rm -r python/user/dist

$(ui): $(user_bot)
Expand Down
2 changes: 1 addition & 1 deletion python/operator/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup

setup(name='daml-chat-operator-bot',
version=os.environ.get('DDIT_VERSION', 'release'),
version=os.environ.get('BOT_VERSION', 'release'),
description='Daml Chat Operator',
author='Digital Asset',
license='Apache2',
Expand Down
2 changes: 1 addition & 1 deletion python/user/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup

setup(name='daml-chat-user-bot',
version=os.environ.get('DDIT_VERSION', 'release'),
version=os.environ.get('BOT_VERSION', 'release'),
description='Daml Chat User',
author='Digital Asset',
license='Apache2',
Expand Down

0 comments on commit 932f47a

Please sign in to comment.