Skip to content

Commit e5ee538

Browse files
authored
Merge pull request #1779 from pSchlarb/fix_missing_general_config
Fixed prepare_package Script
2 parents 18e2ff0 + cc8235a commit e5ee538

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

Diff for: build-scripts/ubuntu-2004/prepare-package.sh

+16-19
Original file line numberDiff line numberDiff line change
@@ -24,41 +24,38 @@ echo -e "\nGenerating manifest"
2424
bash -ex $GENERATE_MANIFEST_SCRIPT
2525
cat $module_name/__manifest__.json
2626

27-
echo -e "\n\nPrepares indy-node debian package version"
28-
sed -i -r "s~indy-node==([0-9\.]+[0-9])(\.)?([a-z]+)~indy-node==\1\~\3~" setup.py
29-
3027
if [ "$distro_packages" = "debian-packages" ]; then
28+
echo -e "\n\nPrepares indy-node debian package version"
29+
sed -i -r "s~indy-node==([0-9\.]+[0-9])(\.)?([a-z]+)~indy-node==\1\~\3~" setup.py
30+
3131
# Update the package names to match the names that are available on the os.
3232
echo -e "\nAdapt the dependencies for the Canonical archive"
3333
sed -i "s~timeout-decorator~python3-timeout-decorator~" setup.py
3434
sed -i "s~distro~python3-distro~" setup.py
3535
sed -i "s~importlib-metadata=~python3-importlib-metadata=~" setup.py
3636

37-
3837
# Only used for the deb package builds, NOT for the PyPi package builds.
3938
echo -e "\n\nPrepares indy-plenum debian package version"
4039
sed -i -r "s~indy-plenum==([0-9\.]+[0-9])(\.)?([a-z]+)~indy-plenum==\1\~\3~" setup.py
41-
40+
41+
echo "Preparing config files"
42+
GENERAL_CONFIG_DIR="\/etc\/indy"
43+
REPO_GENERAL_CONFIG_DIR="indy_node/general_config"
44+
# Define user config directory
45+
sed -i "s/^\(GENERAL_CONFIG_DIR\s*=\s*\).*\$/\1\"$GENERAL_CONFIG_DIR\"/" indy_common/config.py
46+
# Create user config
47+
cp $REPO_GENERAL_CONFIG_DIR/general_config.py $REPO_GENERAL_CONFIG_DIR/indy_config.py
48+
cat $REPO_GENERAL_CONFIG_DIR/ubuntu_platform_config.py >> $REPO_GENERAL_CONFIG_DIR/indy_config.py
49+
rm -f $REPO_GENERAL_CONFIG_DIR/general_config.py
50+
rm -f $REPO_GENERAL_CONFIG_DIR/ubuntu_platform_config.py
51+
rm -f $REPO_GENERAL_CONFIG_DIR/windows_platform_config.py
4252
elif [ "$distro_packages" = "python-packages" ]; then
4353
echo -e "\nNo adaption of dependencies for python packages"
4454
else
4555
echo -e "\nNo distribution specified. Please, specify distribution as 'debian-packages' or 'python-packages'."
4656
exit 1
4757
fi
4858

49-
echo "Preparing config files"
50-
GENERAL_CONFIG_DIR="\/etc\/indy"
51-
REPO_GENERAL_CONFIG_DIR="indy_node/general_config"
52-
# Define user config directory
53-
sed -i "s/^\(GENERAL_CONFIG_DIR\s*=\s*\).*\$/\1\"$GENERAL_CONFIG_DIR\"/" indy_common/config.py
54-
# Create user config
55-
cp $REPO_GENERAL_CONFIG_DIR/general_config.py $REPO_GENERAL_CONFIG_DIR/indy_config.py
56-
cat $REPO_GENERAL_CONFIG_DIR/ubuntu_platform_config.py >> $REPO_GENERAL_CONFIG_DIR/indy_config.py
57-
rm -f $REPO_GENERAL_CONFIG_DIR/general_config.py
58-
rm -f $REPO_GENERAL_CONFIG_DIR/ubuntu_platform_config.py
59-
rm -f $REPO_GENERAL_CONFIG_DIR/windows_platform_config.py
60-
6159
popd
6260

63-
echo -e "\nFinished preparing $repo for publishing\n"
64-
61+
echo -e "\nFinished preparing $repo for publishing\n"

0 commit comments

Comments
 (0)